-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SemanticTokensModifier: Add unused
token modifier
#604
Comments
The LSP already supports this via |
@aeschli what it your take on this. I actually do think we should support unused / unreachable code in semantics as well. |
If you want to just mark a single token e.g identifier of a variable or parameter declaration as unused, yes, having a unused modifier is feasible. |
Yes I was originally thinking a whole range which is why I proposed "unreachable" but agree that if we are to mark single tokens (and I think that's entirely reasonable and desired) as unused then there should be an "unused" modifier. |
@aeschli any take of adding the modifier? |
I created microsoft/vscode#97063 to collect proposals for new standard token types/modifiers. |
unused
token modifier
Thanks @aeschli |
Lets wait for the outcome in VS Code. |
I was thinking today how one might implement "grey out unreachable code" and I think we could do it with semantic tokens. Furthermore it's a pretty common operation spanning many languages. As such I think a modifier for "unused" or "unreachable" should be added to the protocol for consistency across languages.
The text was updated successfully, but these errors were encountered: