mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-14 16:07:52 +00:00
Plugins read problems from a host-owned snapshot that records every Diagnostics event per file and producer, instead of the UI-reported Problems reports, so what a plugin sees no longer depends on window lifetime or the invoking window. Adds the problems-changed workbench event (plugin API 1.8.0, gated at needs_api 8), editor focus events for files of other windows, severity style previews in plugin settings, and lays plugin annotations on the line-end chain before code-vision hints and inline blame. Components and fixtures are rebuilt for API 1.8.0. Co-authored-by: muutot <92625353+muutot@users.noreply.github.com>
23 lines
805 B
Plaintext
23 lines
805 B
Plaintext
package openidea:plugin@1.8.0;
|
|
|
|
/// 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>;
|
|
}
|