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
Syntax highlighting color of keywords should remain constant #4845
Comments
I believe this is as designed, we wanted to show a different color to indicate when operators were overloaded |
This is not really helpful considering all examples in my screenshot are of default objects, so no overloading was actually done. Even then, I think it hurts readability, as the color schema loses its primary purpose while providing little benefit, supposing linking is still allowed. |
@heejaechang, what do you think about this? Should we not use the |
sorry for late reply. currently, we only consider types from that said, I think if one doesn't care about seeing which types override operators, he should use theme that doesn't show that. we mark tokens that information for people who cares about it. it is up to the theme and users whether they utilize that info or not. completely removing that info will affect everyone who wants that info. semantic token provider is supposed to provide categorization of tokens, and it is up to theme to pick which info they will utilize. |
Except that I'm using the default dark theme, the same as many users. It is not helpful to me in that I rely on the current color scheme to separate functions and keywords. |
unfortunately, only way to do so will be you overriding the theme's color if the theme is using the overriden modifier by default. you will need something like this in your setting.json file.
the color, you can use |
At this point this would be the same as manually overriding the entire theme just to get the UX that has better readability. I like having the ability to link to the overrides, but the change in color hurts a lot more than it helps. |
I'm not sure that's true. You probably need at most 3 tokens overridden: Also, you don't even need to do that all at once; just start with |
This issue has been fixed in prerelease version 2024.5.100, which we've just released. You can find the changelog here: CHANGELOG.md |
Environment data
Code Snippet
Expected behavior
Keywords like
in
and operators like+
should use default color even if custom definitions exist, but still allow linking as implemented in #4467Actual behavior
Keyword use function color when custom definition exist, and normal color otherwise. I'm not sure if operators colors change as well, since my vision is not good, but they also should follow the same behavior.
Logs
pylance.log
The text was updated successfully, but these errors were encountered: