mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-14 16:07:52 +00:00
Plugins could show their own content in an editor tab (open-content-tab) but
could open the diff viewer only as the reply to one of that tab's actions. A
review plugin (a merge request's files, say) had no way to show a file's
before and after.
views.open-diff opens two texts in the invoking window's diff viewer, with
optional labels and title and a file name that picks the syntax highlighting;
web views send { op: "open-diff", ... }. The SDK wraps it as host::open_diff
with a mock. The plugin API moves to 1.7.0 (1.6.0 is released) and the checked-in
components are rebuilt.
23 lines
805 B
Plaintext
23 lines
805 B
Plaintext
package openidea:plugin@1.7.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>;
|
|
}
|