mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 08:03:19 +00:00
Plugin API 1.12 adds workspace set-console-rules: a plugin replaces its list of highlight rules (regex in the Rust/JS common subset, validated on the host and bounded to 512 bytes and 100 rules; palette foreground/background, styles, whole-line or match-only, enabled). Every window applies the rules to the stdout and stderr lines of its Run and Debug consoles; the plugin never sees the output, and the rules go away when the plugin stops. Components rebuilt for 1.12. Closes #3304 Co-authored-by: bertyhell <1710840+bertyhell@users.noreply.github.com>
32 lines
2.2 KiB
Plaintext
32 lines
2.2 KiB
Plaintext
package openidea:plugin@1.12.0;
|
|
|
|
/// Editor and project-tree decorations (API 1.4). Requires project.read. An editor set
|
|
/// follows its file: the file's own project, or the nearest one when it is outside them all.
|
|
/// Tree sets are rooted in an open project. Sets belong to the plugin and disappear when it stops.
|
|
/// Styles: highlight, search, added, modified, removed, warning, error, info,
|
|
/// typo, weak, underline, strikethrough, muted. Unknown styles are ignored. Theme tokens only.
|
|
interface decorations {
|
|
use types.{error, range};
|
|
/// An editor annotation; after is plain text shown after the range.
|
|
record decoration { range: range, style: string, hover: option<string>, after: option<string> }
|
|
/// A project-tree annotation; badge is at most two Unicode characters.
|
|
record file-decoration { badge: option<string>, style: string, tooltip: option<string> }
|
|
/// Replace this set for a file. At most 10,000 items/file and 50 editor sets/plugin.
|
|
/// Metadata is bounded to 4 MiB per plugin. Unknown styles are ignored.
|
|
set: func(path: string, set-id: string, items: list<decoration>) -> result<_, error>;
|
|
/// Remove this editor set from every file/project.
|
|
clear: func(set-id: string) -> result<_, error>;
|
|
/// Replace this set's tree annotation for a file; at most 50 tree sets/plugin.
|
|
set-file: func(path: string, set-id: string, item: file-decoration) -> result<_, error>;
|
|
/// Remove this tree set from every file/project.
|
|
clear-file: func(set-id: string) -> result<_, error>;
|
|
/// Replace this set's tree annotation for a file with a note shown after its name (API 1.7):
|
|
/// one line of at most 200 characters, with an optional tooltip.
|
|
set-file-note: func(path: string, set-id: string, note: string, tooltip: option<string>) -> result<_, error>;
|
|
/// Replace this set's tree icon for a file or folder with an id declared under
|
|
/// `[[contributes.fileIcons]]` (API 1.8), with an optional tooltip.
|
|
set-file-icon: func(path: string, set-id: string, icon: string, tooltip: option<string>) -> result<_, error>;
|
|
/// Replace all `(path, icon)` entries of a tree set at once (API 1.8; at most 10,000 entries).
|
|
set-file-icons: func(set-id: string, items: list<tuple<string, string>>) -> result<_, error>;
|
|
}
|