-
Notifications
You must be signed in to change notification settings - Fork 30
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
Local variables are randomly highlighted incorrectly. #59
Comments
@jeff-hykin is going to need to resolve this one. For now, you can restore 1.32 colorization with "editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "variable.other.object.access.cpp",
"settings": {
"foreground": "#BBB"
}
},
{
"scope": "punctuation.separator.pointer-access.cpp",
"settings": {
"foreground": "#B877dB"
}
}
]
}
|
I'll look at changing this behavior. All of those are tagged correctly, but I will look into changing the behavior to have |
@jeff-hykin tagging "scope": "variable.other.cpp",
"settings": {
"foreground": "#BBB"
} |
That would be resolved by the proposal described at #61 (comment) where |
I changed the tags to be the same as Java, Javascript, C# and some other languages. If you want
Here's how it would look in your settings.json
If you think it should be that way by default on your theme, then show them the above code and they should know what to do. |
@ThadHouse Let me know if this is still an issue for you. |
It seems really weird to not have the fix be the default. No intellisense colorizer I've ever seen for any language makes variable declarations different colors then variable usages. Its very off putting, and just looks bad. I notice the issue even more with checking shared_ptr's in an if statement, because inside the |
Also, the |
I agree with @ThadHouse about the default behavior with regard to the original issue. It looks like #71 has now been created to track my other issue with variable declaration. |
@ThadHouse Why this is happeningThe syntax doesn't change the colors, it changes the knowledge that VS Code has, and then the theme uses that knowledge to color the code. Right now one of the few times we know that something is a variable (specifically an object) is when an accessor The tags are standard across languages, so if you open up Java or Javascript your theme will likely color Themes likely have a blanket statement that sets all variables to a particular color, it just so happens that in C++ theres only a few times when we know something is more-than-likely a variable. The underlying issue (I will make a new issue for this)I think the fundamental issue is that the syntax should be able to see all variables. I would love that, and I'm willing to put in work to try to make that a reality, but sadly we are not there yet. Even more than that, I'm not even sure if it is possible with a TextMate grammar for the very syntax-bloated edgecase-filled confusing language that is C++. What to do while we work on thatIf you think the colors should be different, please ask the theme provider to set If the theme providers disagree or don't respond, then add a color customization to your settings and it will override the theme. |
Thank you @jeff-hykin and @matter123 for your responsiveness. I understand that the scope of work involved here is very large, and I appreciate your willingness to tackle it! |
The postWakeup should not be highlighted with the same highlight as member variables. It's very distracting to not be consistent about this.
The text was updated successfully, but these errors were encountered: