Файли
openidea/sdk/rust/openidea-plugin/wit/hover.wit
T
l0ng-ai 047cac209b feat(plugins): plugin API 1.4 (#2207)
Plugin API 1.4: grants for unencrypted HTTP, local sockets, IDE commands and owned database sources; window status items, output channels, content tabs, editor selections, decorations, search, Problems and VCS reads; runs, keyed terminals with exit events, plugin run targets, dynamic run configurations and test parsers; language features, injections, snippets and menu locations; plugin MCP tools on the built-in server; four official API examples. Released 1.3 plugins keep working.
2026-11-09 08:40:40 +08:00

30 рядки
948 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>;
}