mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 08:03:19 +00:00
Adds the optional hover-actions export (plugin API 1.14): plugins contribute a host-rendered action at the left edge of an editor line, revealed by hovering the first four columns of any line in its start-line..end-line range and anchored to its declaration line. The host keeps it left of the line's text, out of the intention bulb's row, never takes focus on hover, collapses several actions into an overflow menu, and lists them in the editor context menu for keyboard access. SDK HoverActions, a minimal fixture, API-compat tests, docs and regenerated components. Review fixes: the button is positioned on its first show (it was left unpositioned until the next mouse move), the styles use theme tokens, the overflow menu is the shared context menu, and the labels go through the text catalog. Co-authored-by: NeverKnowsTomorrow <36879844+NeverKnowsTomorrow@users.noreply.github.com>
40 lines
1.4 KiB
Plaintext
40 lines
1.4 KiB
Plaintext
package openidea:plugin@1.14.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>;
|
|
}
|