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>
17 lines
875 B
Plaintext
17 lines
875 B
Plaintext
package openidea:plugin@1.10.0;
|
|
|
|
/// Embedded languages. The host routes plugin providers and configured language
|
|
/// servers inside these ranges, preserving host-document UTF-16 coordinates.
|
|
/// Each LSP range gets its own masked, in-memory sibling document (at most 32
|
|
/// per host document, documents over 2 MiB excluded). No file is written.
|
|
/// Formatting and rename continue to use the host language's server.
|
|
interface injections {
|
|
/// A versioned document snapshot. Coordinates are zero-based UTF-16.
|
|
record document { path: string, language: string, version: u64, text: string }
|
|
/// A host-document range containing the named language.
|
|
record injection { range: range, language: string }
|
|
use types.{range};
|
|
/// Embedded ranges, refreshed after edits under the editor-provider budget.
|
|
injections: func(doc: document) -> list<injection>;
|
|
}
|