-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
Semantic token modifiers do not appear to affect colors #125448
Comments
(Experimental duplicate detection) |
I tried to reproduce with the go extension, but did not see any semantic tokens. @stamblerre What semantic tokens is go emitting? Also can you comment on this: string.modification is not (yet) an established way to represent placeholders in strings, so I'm not sure we will just add that in VSCode. But extensions can also such TextMate scope mappings: https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide#custom-textmate-scope-mappings (second example) |
The Go extension has semantic tokens disabled by default, since we need to resolve these issues before enabling them. This feature can be enabled through the following setting: "gopls": {
"ui.semanticTokens": true
}
I think the larger issue is that none of the modifiers ( We can try to use the customization, but we were just surprised that modifiers would have no effect in the default theme. |
Various issues here: It realize our Dark+/Light+ themes don't colorize string placeholders with TextMate grammars. The On semantic highlighting:
|
Thank you for the detailed explanation. We will try to experiment with customizations for our extension and suggest the |
Closing the issue then. Please reopen if you find something that needs to be fixed. |
The Go language server uses the semantic tokens feature and applies modifiers to certain semantic tokens, such as strings. The goal is to achieve special colorization for formatting directives and special characters, e.g.:
However, these modifiers do not seem to affect the colorization of the tokens. Setting a specific color for the modifier in the VS Code settings via
editor.semanticTokenColorCustomizations
did work correctly, however.From microsoft/language-server-protocol#1281:
VS Code version:
1.57.0-insider
286b643
x64
OS version:
Mac OS Big Sur 11.3.1
The text was updated successfully, but these errors were encountered: