дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-26 20:46:22 +02:00
[[contributes.overlays]] declares a package web page that floats over the workbench at one of nine anchors while its when clause holds. It never takes the keyboard focus when shown (out of the tab order), sits under dialogs, popups and notifications, and can let every click through (interactive = false). The page moves and resizes itself with openidea.overlay.get() / place({ anchor, width, height }); sizes are clamped to 40-800 px. It needs no code and no capability, since the page sees nothing of the IDE.
Overlays are gated on plugin API 1.18.0 (package openidea:[email protected].0, engine, SDK, api_compat, rebuilt components); 1.17 is listed as shipped with 0.1.53.
Part of #6012
Co-authored-by: xirf <[email protected]>
40 рядки
1.4 KiB
Plaintext
40 рядки
1.4 KiB
Plaintext
package openidea:[email protected];
|
|
|
|
/// 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>;
|
|
}
|