Skip to content
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

Some of the keywords in the highlight are the wrong color #1523

Open
harry-xi opened this issue Jul 26, 2024 · 3 comments
Open

Some of the keywords in the highlight are the wrong color #1523

harry-xi opened this issue Jul 26, 2024 · 3 comments

Comments

@harry-xi
Copy link

Describe the bug

Process control keywords such as if match for are represented by the semantic token type as other making them highlighted as normal keywords, which is not in line with the general habits of vscode users.

To Reproduce Steps to reproduce the behavior:

1.Open a scala file with this plugin enabled and enter any statement of this type in it.

Expected behavior

Keywords such as if match for should be tagged with keyword.control

Screenshots

image

Installation:

  • Operating system: Windows
  • VSCode version: 1.91.1
  • VSCode extension version: 1.38.0
  • Metals version: 1.3.4

Search terms

@tgodzik
Copy link
Contributor

tgodzik commented Jul 26, 2024

Thanks for reporting! I think this might be a VS Code only modifier as LSP protocol doesn't declare it: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_semanticTokens

And the Scala syntax default scopes are non standard. You can turn off semantic highlighting and that should use the default textmate highlighting.

@harry-xi
Copy link
Author

Thanks for reporting! I think this might be a VS Code only modifier as LSP protocol doesn't declare it: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_semanticTokens

And the Scala syntax default scopes are non standard. You can turn off semantic highlighting and that should use the default textmate highlighting.

I looked at some other languages and noticed the fact that these languages do not semantically highlight keywords such as if

image
image

@tgodzik
Copy link
Contributor

tgodzik commented Jul 26, 2024

Interesting, that might actually be an option for non soft keywords, which are not easy to detect with the usual syntax highlight

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants