Files
openidea/wit/inlay.wit
T
Bert Verhelstandbertyhell 64ee712401 feat(plugins): diffs with a missing side for added and deleted files (API 1.10) (#3827)
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>
2026-11-17 03:07:57 +08:00

40 lines
1.4 KiB
Plaintext

package openidea:plugin@1.10.0;
/// Optional export (world `plugin-inlay-hints`): inline hints in documents of
/// the languages declared with the `inlay-hints` provider kind, including
/// languages the plugin doesn't contribute. They are shown next to the
/// language server's hints.
interface inlay-hints-provider {
use types.{position, range};
/// The document the hints are for (the editor's text while it is open).
record document {
path: string,
language: string,
version: u64,
text: string,
}
/// A hint shown at `position`, before the character there.
record inlay-hint {
/// UTF-16 position (0-based line and column).
position: position,
/// The text shown, e.g. `GET /orders` or `: string`.
label: string,
/// `type` or `parameter` follow the Inlay Hints settings of that kind;
/// anything else counts as `other`.
kind: string,
/// Shown when the pointer rests on the hint.
tooltip: option<string>,
/// A space before the label.
padding-left: bool,
/// A space after the label.
padding-right: bool,
}
/// The hints within `range` (the visible part of the document), under the
/// edit-path budget. Hints outside `range` are dropped; at most 10,000 per
/// call.
inlay-hints: func(doc: document, range: range) -> list<inlay-hint>;
}