Файли
openidea/wit/completion-list.wit
T
l0ng-ai bfbc70a438 feat(plugins): editor decorations with their own colors (API 1.17) (#5957)
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.
2026-11-26 03:40:40 +08:00

30 рядки
1.0 KiB
Plaintext

package openidea:[email protected];
/// Optional export (API 1.16, world `plugin-completion-list`): completion that
/// can say its list is incomplete. A plugin exporting it is called instead of
/// `providers.completion` for its `completion` provider kind.
interface completion-list-provider {
use types.{position};
use providers.{document, completion-item};
record completion-list {
items: list<completion-item>,
/// Typing on in the same word asks this plugin again (with the new text)
/// instead of filtering these items. Other providers' items are kept.
incomplete: bool,
}
completion: func(doc: document, at: position, trigger: option<string>) -> completion-list;
}
/// The optional export-only world the SDK merges with `plugin`.
world completion-list-exports {
export completion-list-provider;
}
/// The host-side world used to instantiate a component that exports it.
world plugin-completion-list {
include plugin;
export completion-list-provider;
}