дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-26 11:18:20 +02:00
Plugin API 1.17: decorations.set-styled (SDK host::set_styled_decorations) lets editor decoration items carry their own #rrggbb / #rrggbbaa foreground and background, for colors the theme palette lacks (e.g. a TODO highlighter's user-chosen colors). - Host validates and normalizes colors (anything else is Invalid); an item with colors may leave style empty; set ids, limits and clear are shared with set / set-markdown. - Editor paints the range with inline color / background-color; the after label takes the foreground only; the frontend re-checks the hex format. - SDK types, wrapper and mock (shared replace/limit helper for the three decoration kinds); decorations fixture gains a styled command. - Package openidea:[email protected].0, engine 1.17.0, components rebuilt; docs list 1.16 as shipped with 0.1.52.
30 рядки
949 B
Plaintext
30 рядки
949 B
Plaintext
package openidea:[email protected];
|
|
|
|
/// Optional export (world `plugin-hover`): Markdown added to the hover of
|
|
/// documents of the languages declared with the `hover` provider kind,
|
|
/// including languages the plugin doesn't contribute. It shows below the
|
|
/// language server's hover, under the edit-path budget.
|
|
interface hover-provider {
|
|
use types.{position, range};
|
|
|
|
/// The document hovered (the editor's text while it is open).
|
|
record document {
|
|
/// Absolute path.
|
|
path: string,
|
|
language: string,
|
|
version: u64,
|
|
text: string,
|
|
}
|
|
|
|
/// What the plugin adds to the hover.
|
|
record hover-content {
|
|
/// At most 64 KiB.
|
|
markdown: string,
|
|
/// The text the hover describes; used when the server names none.
|
|
range: option<range>,
|
|
}
|
|
|
|
/// The hover at `at`, or `none` to add nothing.
|
|
hover: func(doc: document, at: position) -> option<hover-content>;
|
|
}
|