-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add config to disable keywords highlight #21426
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
base: master
Are you sure you want to change the base?
Conversation
The editor has already highlighted the keywords, and users may not necessarily need r-a highlighted keywords
|
I... don't know how I feel about yet another config. Sure, the editor will usually highlight them, but is it this bad to highlight them us too? Also FWIW the editor handling is incorrect at least in some editors, e.g. VSCode does not highlight contextual keywords like |
The keyword highlighting of r-a is difficult to customize, so I usually disable the highlighting of r-a. BTW, I also plan to add configuration in other PR to disable symbol highlighting
This config is enabled by default, it's not a big problem |
How so? It provides even more granularity than the usual editor, and of course the colors are completely your choice.
It is a big problem for maintainability and searchability of the configs. Not this specific one, of course, but the dozens of configs we're accumulating (we already have almost 200 options!) In the past the approach was to say "yes" to any user wanting a config (and finding someone to implement it, of course). Now I believe the default should be "no" unless the config will matter for many users, or will be very important to few. Of course that's only my personal opinion. CC @rust-lang/rust-analyzer what are your thoughts on this, and on the subject in general? |
But disabling r-a highlighting, editor configuration can refine colors to specific keywords instead of all keywords or category |
|
r-a does provide some tags to keywords groups. If you want more granular control than that then I'll repeat my saying that I don't believe r-a should support that. |
|
This is technically solved by the lsp augmentsSyntax or whatever that s called capability I think which will make r-a drop most regular highlighting that are unnecessary, unfortunately the text mate grammar VSCode ships for rust is really bad so we've disabled that capability in the extension code. |
|
I think @Wilfred got commit bit on the underlying Textmate grammar recently and might be able to get improvements into it. I'm pretty sure that VS Code will pick any changes on their next submodule sync. |
|
Yep, happy to review any PRs on https://github.com/dustypomerleau/rust-syntax. I haven't noticed it being terribly bad, would be interested to hear what issues you've seen. |
|
I don't recall specifics, just that it vastly differs from what our semantic tokens map to meaning unanalyzed things look completely different than analyzed ones |
The editor has already highlighted the keywords, and users may not necessarily need r-a highlighted keywords