mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-18 16:08:55 +00:00
views.open-diff takes exactly two texts, so a plugin could not tell the IDE that a file does not exist on one side, and the diff drew an empty pane next to it. API 1.10 adds views.open-file-diff with a file-diff record whose left / right are option<string> (none: the file does not exist there; both none is invalid); the SDK adds host::open_file_diff with a mock, and web views may send null for a missing side. A missing side maps to the same absent text side the VCS diffs use, so the existing side shows alone. open-diff and content-diff are unchanged. The WIT package, ENGINE_VERSION and API_VERSION move to 1.10.0, with the checked-in components rebuilt. Closes #3780 Co-authored-by: bertyhell <1710840+bertyhell@users.noreply.github.com>
32 lines
1.1 KiB
Plaintext
32 lines
1.1 KiB
Plaintext
package openidea:plugin@1.10.0;
|
|
|
|
/// 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>;
|
|
}
|