mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 16:04:21 +00:00
Plugin API 1.15 adds a caret-moved event through the existing events.other channel (no WIT interface or signature change): {path, line, col, settled} with 0-based UTF-16 positions for the focused editor. The frontend batches caret moves after 120 ms (only the latest position per file) and sends one settled event 600 ms after the caret rests; queued and delayed events are dropped when the editor, document, path or project changes. editor-focused now carries the focused editor (path, language, selections) through an optional argument on plugin_set_active_file, which the remote adapter forwards. Requires the events capability; components and fixtures are rebuilt for 1.15.
Co-authored-by: charli117 <24435100+charli117@users.noreply.github.com>
41 lines
1.4 KiB
Plaintext
41 lines
1.4 KiB
Plaintext
package openidea:plugin@1.15.0;
|
|
|
|
/// Optional export (world `plugin-hover-actions`): clickable actions rendered
|
|
/// at the left edge of a line and revealed while the pointer is in the leftmost
|
|
/// editing-area strip of the action's line range.
|
|
interface hover-actions {
|
|
use language-features.{document};
|
|
|
|
/// An action drawn at the left edge of `line`.
|
|
record hover-action {
|
|
/// The line the button is drawn on; normally the declaration line.
|
|
line: u32,
|
|
/// First line whose left strip reveals this action, inclusive.
|
|
start-line: u32,
|
|
/// Last line whose left strip reveals this action, inclusive.
|
|
end-line: u32,
|
|
/// Optional icon: a registered icon name or a declared manifest SVG path.
|
|
icon: option<string>,
|
|
/// Text shown when no icon is present, or beside the icon.
|
|
label: string,
|
|
tooltip: option<string>,
|
|
/// This plugin's declared command.
|
|
command: string,
|
|
argument: option<string>,
|
|
}
|
|
|
|
/// Actions for the visible document, under the editor-provider budget.
|
|
hover-actions: func(doc: document) -> list<hover-action>;
|
|
}
|
|
|
|
/// The optional export-only world the SDK merges with `plugin`.
|
|
world hover-actions-provider {
|
|
export hover-actions;
|
|
}
|
|
|
|
/// The host-side world used to instantiate a component that exports it.
|
|
world plugin-hover-actions {
|
|
include plugin;
|
|
export hover-actions;
|
|
}
|