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

23 рядки
805 B
Plaintext

package openidea:[email protected];
/// Optional export (world `plugin-diagnostics`): problems in the current,
/// possibly unsaved document, for the languages declared with the
/// `diagnostics` provider kind. Asked shortly after a document opens or
/// changes, under the editor-provider budget; it can't ask the user.
interface diagnostics-provider {
use diagnostics.{diagnostic};
/// The document to check (the editor's text, unsaved edits included).
record document {
/// Absolute path.
path: string,
language: string,
version: u64,
text: string,
}
/// The document's problems, at most 5,000; they replace what this
/// provider reported before, and an empty list removes them.
diagnostics: func(doc: document) -> list<diagnostic>;
}