дзеркало
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]>
64 рядки
2.3 KiB
Plaintext
64 рядки
2.3 KiB
Plaintext
package openidea:[email protected];
|
|
|
|
/// Cross-file associations a plugin publishes for the files it declares under
|
|
/// `[[contributes.documentIndexers]]`. The host calls `index` in cancellable
|
|
/// background batches (on project open, then for changed files), keeps the
|
|
/// project-wide graph, and answers Go to Declaration and gutter markers from
|
|
/// it without calling the plugin again. Requires `project.read`; trusted
|
|
/// projects only.
|
|
interface document-indexer {
|
|
use types.{range};
|
|
|
|
/// A symbol the host's syntax support found in the document.
|
|
record symbol {
|
|
name: string,
|
|
/// class, interface, method, field, … as in the structure view.
|
|
kind: string,
|
|
/// The enclosing symbol's name.
|
|
container: option<string>,
|
|
range: range,
|
|
}
|
|
|
|
/// The document to index: the editor's text while it is open, else the file's.
|
|
record document {
|
|
/// Absolute path.
|
|
path: string,
|
|
text: string,
|
|
symbols: list<symbol>,
|
|
}
|
|
|
|
/// A range of the document tied to a key the plugin chooses
|
|
/// (`com.example.UserMapper#findById`, say). Keys are compared as is.
|
|
/// Ranges lie inside the document; an empty one marks a position (a
|
|
/// definition that is the whole file, at its start): Go to Declaration
|
|
/// lands there, Find Usages and Rename skip it.
|
|
record anchor {
|
|
key: string,
|
|
range: range,
|
|
}
|
|
|
|
/// Keys starting with `prefix` also resolve as if they started with
|
|
/// `target`; both end with `#`. A mapper that extends another finds the
|
|
/// inherited statements this way.
|
|
record alias {
|
|
prefix: string,
|
|
target: string,
|
|
}
|
|
|
|
/// What one document contributes; replaces its previous edges.
|
|
record edges {
|
|
/// Where keys are declared.
|
|
definitions: list<anchor>,
|
|
/// Ranges that go to the definitions of their key (Go to Declaration,
|
|
/// Ctrl/⌘-click). Elsewhere the language server answers as usual.
|
|
references: list<anchor>,
|
|
aliases: list<alias>,
|
|
/// Gutter icons on their first line that go to the definitions of their key.
|
|
markers: list<anchor>,
|
|
}
|
|
|
|
/// At most 4,096 definitions and references and 256 aliases per document;
|
|
/// a document over the limits is reported as not indexed.
|
|
index: func(doc: document) -> edges;
|
|
}
|