mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 16:04:21 +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>
35 lines
1.2 KiB
Plaintext
35 lines
1.2 KiB
Plaintext
package openidea:plugin@1.14.0;
|
||
|
||
/// On-demand results for `[[contributes.searchCategories]]`. Optional, API 1.13.
|
||
interface search-provider {
|
||
use types.{error, location};
|
||
use invocation.{invocation};
|
||
|
||
record search-command {
|
||
/// A command declared by this plugin, without the host's prefix.
|
||
id: string,
|
||
arg: option<string>,
|
||
}
|
||
variant search-target {
|
||
/// A valid UTF-16 range inside the current project.
|
||
location(location),
|
||
command(search-command),
|
||
}
|
||
record search-item {
|
||
/// Stable within this plugin's category and query results.
|
||
id: string,
|
||
title: string,
|
||
description: option<string>,
|
||
target: search-target,
|
||
}
|
||
record search-page {
|
||
items: list<search-item>,
|
||
has-more: bool,
|
||
}
|
||
/// The category's local manifest id, raw query (at most 1024 UTF-8 bytes),
|
||
/// and requested maximum (1–200). Preserve ranking in the returned list.
|
||
/// Empty queries may return initial suggestions. This is a background call:
|
||
/// no prompts or implicit commands. Superseded queries are cancelled by the host.
|
||
search: func(category: string, query: string, limit: u32, ctx: borrow<invocation>) -> result<search-page, error>;
|
||
}
|