-
Notifications
You must be signed in to change notification settings - Fork 18k
x/tools/gopls: recent updates made VS Code colors broken #46450
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
Comments
The change that caused this was https://golang.org/cl/323169, which enables semantic tokens through the LSP rather than through VS Code's default textmate grammar. This implementation follows the LSP specification of the semantic tokens feature, which does not allow the server to specify any specific colors. It seems possible that your color theme may not support this feature well. For example, I see different colors for |
You can also disable the semantic tokens feature through the "gopls": {
"ui.semanticTokens": true
} setting, but note that we do intend to deprecate the original grammar in the future. |
I'm using standard "Monokai" color theme of VS Code. You can switch it easily back and forth in VS Code command prompt. Please also note that there is no highlighting of formatting verbs Is there any way to stick to old scheme? |
See #45753 for the semantic tokens for formatting verbs--we will work on addressing that soon. And you can get the old implementation back by setting: "gopls": {
"ui.semanticTokens": false
} |
Duplicate of #45753 |
Here is what it looks like on gopls@latest (v0.6.11):

Here is what it looks like on gopls@master (installed with

go install
):The text was updated successfully, but these errors were encountered: