"unknown/undefined" semantic token type #2592
benblo
started this conversation in
Enhancement
Replies: 1 comment
-
Moving this issue to discussion as an enhancement request for comments and upvotes. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It would be great if any token that is not recognized would be tagged with an "unknown" type, so we can configure coloring rules for them.
For example:
Here , using the scopes inspector,

my_attribute
is identified with the semantic token type "property".But,
doesnt_exist
has no semantic information at all:By default,
my_attribute
appears blue, whiledoesnt_exist
exist appears white, but if I wanted to highlight it in red or grey or something, what semantic rule am I supposed to modify?It feels like this goes under an "anything" umbrella; I would rather have a "known to be unknown" type.
Similarly, unknown globals are identified by the analyzer with a yellow squiggle, but they also don't have any semantic information:

I would like to be able to change their coloring, eg if analysis is suppressed somehow (for example with
"reportUndefinedVariable": "none"
).Beta Was this translation helpful? Give feedback.
All reactions