дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 03:05:40 +02:00
feat(plugins): brand document-indexer gutter markers with marker icons (#2196)
Indexed markers (Edges.markers) were always drawn with the navigation glyph, so a plugin couldn't tell its marker kinds apart. A [[contributes.markerIcons]] entry can now claim them by key prefix (`markers`), with an optional `tooltip` shown above the targets. The host matches the longest prefix and sends the declaration id with each marker; the editor resolves the icon and the translated tooltip from the projected declaration. Manifest only, under the existing API 1.3 gate of markerIcons. Closes #2194
Цей коміт міститься в:
1 джерело
e1be533bd2
коміт
e0982cc51d
15 files changed
+341
-31
No files matched your search
@@ -31,6 +31,22 @@ Keys are the plugin's own strings and ranges are UTF-16. When a key has
|
||||
definitions in the same detected module, other modules' definitions are left
|
||||
out. Several targets open a chooser.
|
||||
|
||||
A marker's tooltip lists its targets. With API 1.3, a `[[contributes.markerIcons]]`
|
||||
entry can brand markers by key prefix; the longest matching prefix wins, and
|
||||
other markers keep the navigation glyph:
|
||||
|
||||
```toml
|
||||
[[contributes.markerIcons]]
|
||||
id = "usages"
|
||||
icon = "icons/usages.svg"
|
||||
iconDark = "icons/usages_dark.svg"
|
||||
markers = ["usages#"]
|
||||
tooltip = "Usages of this class" # shown above the targets
|
||||
```
|
||||
|
||||
A marker published as `Anchor { key: "usages#User".into(), range }` then shows
|
||||
that icon. See `plugins/README.md` for the limits.
|
||||
|
||||
Initial discovery reuses the host's project index. The editor schedules
|
||||
cancellable batches of at most 16 files; edits and file changes invalidate the
|
||||
affected entries before they are indexed again. Reloading, disabling or a
|
||||
|
||||
Reference in new issue
Заблокувати користувача