дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-22 01:20:46 +02:00
Plugins can add their own tabs to the double-Shift search dialog: `[[contributes.searchCategories]]` declares a stable id and a title, and the optional `search-provider` export (SDK `search::SearchProvider`) answers the category's queries. Queries keep their raw text (at most 1024 bytes, 1–200 results), are cancellable and time-boxed, and run without prompts. Results open a validated location in the current project or run one of the plugin's own declared commands. Custom tabs stay out of All, so endpoint search and the other tabs are unchanged; disabling, uninstalling or reloading the plugin withdraws its tabs. Plugin API 1.13 (WIT, engine and SDK versions, docs); `plugin_search` is a cancellable command. Every plugin component is rebuilt. Closes #3966 Co-authored-by: DeH40 <[email protected]>
30 рядки
949 B
Plaintext
30 рядки
949 B
Plaintext
package openidea:[email protected];
|
|
|
|
/// Optional export (world `plugin-hover`): Markdown added to the hover of
|
|
/// documents of the languages declared with the `hover` provider kind,
|
|
/// including languages the plugin doesn't contribute. It shows below the
|
|
/// language server's hover, under the edit-path budget.
|
|
interface hover-provider {
|
|
use types.{position, range};
|
|
|
|
/// The document hovered (the editor's text while it is open).
|
|
record document {
|
|
/// Absolute path.
|
|
path: string,
|
|
language: string,
|
|
version: u64,
|
|
text: string,
|
|
}
|
|
|
|
/// What the plugin adds to the hover.
|
|
record hover-content {
|
|
/// At most 64 KiB.
|
|
markdown: string,
|
|
/// The text the hover describes; used when the server names none.
|
|
range: option<range>,
|
|
}
|
|
|
|
/// The hover at `at`, or `none` to add nothing.
|
|
hover: func(doc: document, at: position) -> option<hover-content>;
|
|
}
|