Файли
openidea/wit/semantic.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

32 рядки
1.1 KiB
Plaintext

package openidea:[email protected];
/// Optional export (world `plugin-semantic-tokens`): semantic colouring of
/// documents of the languages declared with the `semantic-tokens` provider
/// kind, including languages the plugin doesn't contribute. The tokens join
/// the language server's and win where they overlap one.
interface semantic-tokens-provider {
use types.{range};
/// The document to colour (the editor's text while it is open).
record document {
/// Absolute path.
path: string,
language: string,
version: u64,
text: string,
}
/// A token: part of one line.
record semantic-token {
range: range,
/// An LSP token type in kebab-case (`method`, `property`, `type`, …).
kind: string,
/// LSP token modifiers in kebab-case (`static`, `deprecated`, …).
modifiers: list<string>,
}
/// The document's tokens, at most 65,536; asked again after each edit,
/// under the edit-path budget.
semantic-tokens: func(doc: document) -> list<semantic-token>;
}