Файли
openidea/wit/completion-list.wit
T
Anka Tamaтаxirf 2bbba9b945 feat(plugins): overlays, web pages floating over the workbench (API 1.18) (#6046)
[[contributes.overlays]] declares a package web page that floats over the workbench at one of nine anchors while its when clause holds. It never takes the keyboard focus when shown (out of the tab order), sits under dialogs, popups and notifications, and can let every click through (interactive = false). The page moves and resizes itself with openidea.overlay.get() / place({ anchor, width, height }); sizes are clamped to 40-800 px. It needs no code and no capability, since the page sees nothing of the IDE.

Overlays are gated on plugin API 1.18.0 (package openidea:[email protected].0, engine, SDK, api_compat, rebuilt components); 1.17 is listed as shipped with 0.1.53.

Part of #6012

Co-authored-by: xirf <[email protected]>
2026-11-26 20:11:03 +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;
}