Файли
openidea/wit/hover-actions.wit
T
Alexis ad81ff442e feat(plugins): let completion providers mark their list incomplete (#5643)
A plugin's completion was asked once when the popup opened; the editor then only filtered that list, so completions built from what is typed could not be offered. A new optional export, completion-list-provider, returns the items with an incomplete flag and is called instead of providers.completion for that plugin. While the user types on in the same word, only the plugins that marked their list incomplete are asked again; the language server's list and the other plugins' items from the first request are kept. A new word, a trigger character or an incomplete server list asks everyone, as before.

API 1.15 shipped with v0.1.51, so this starts API 1.16: wit/ and the SDK copy move to @1.16.0 with ENGINE_VERSION and API_VERSION, and the checked-in components are rebuilt.

Closes #4970

Co-authored-by: Rhombicdodecahedron <[email protected]>
2026-11-24 23:04:40 +08:00

41 рядки
1.4 KiB
Plaintext

package openidea:[email protected];
/// Optional export (world `plugin-hover-actions`): clickable actions rendered
/// at the left edge of a line and revealed while the pointer is in the leftmost
/// editing-area strip of the action's line range.
interface hover-actions {
use language-features.{document};
/// An action drawn at the left edge of `line`.
record hover-action {
/// The line the button is drawn on; normally the declaration line.
line: u32,
/// First line whose left strip reveals this action, inclusive.
start-line: u32,
/// Last line whose left strip reveals this action, inclusive.
end-line: u32,
/// Optional icon: a registered icon name or a declared manifest SVG path.
icon: option<string>,
/// Text shown when no icon is present, or beside the icon.
label: string,
tooltip: option<string>,
/// This plugin's declared command.
command: string,
argument: option<string>,
}
/// Actions for the visible document, under the editor-provider budget.
hover-actions: func(doc: document) -> list<hover-action>;
}
/// The optional export-only world the SDK merges with `plugin`.
world hover-actions-provider {
export hover-actions;
}
/// The host-side world used to instantiate a component that exports it.
world plugin-hover-actions {
include plugin;
export hover-actions;
}