mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-10-26 11:08:40 +03:00
[symbol-provider-tree-sitter] Fix icon display via symbol.icon
Specifying the icon via the `(#set! symbol.icon "foo")` predicate was having no effect.
This commit is contained in:
parent
33b4eea80d
commit
58d9a0393e
@ -179,3 +179,5 @@ If this value is omitted, this provider will still attempt to match certain comm
|
||||
The `symbol.tag` predicate will set the value of a symbol’s `tag` property to a fixed string.
|
||||
|
||||
The `tag` property is used to supply a word that represents the symbol in some way. For conventional symbols, this will often be something like `class` or `function`.
|
||||
|
||||
This provider will attempt to match certain common tag values to icons. This can be overridden by specifying an explicit `symbol.icon` value.
|
||||
|
@ -246,11 +246,11 @@ class Name {
|
||||
}
|
||||
|
||||
toSymbol() {
|
||||
let { name, shortName, position, context, tag } = this;
|
||||
let symbol = { name, shortName, position };
|
||||
let { name, shortName, position, context, tag, icon } = this;
|
||||
let symbol = { name, shortName, position, icon };
|
||||
if (tag) {
|
||||
symbol.tag = tag;
|
||||
symbol.icon = iconForTag(tag);
|
||||
symbol.icon ??= iconForTag(tag);
|
||||
}
|
||||
if (context) symbol.context = context;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user