Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Code, changing color theme for variables

in VS Code does anyone know how to change the color theme for variable names for C++. I can change the colors for functions, comments, keywords, but I can't get variables to work. Any help would be great Thanks.

like image 219
mellis Avatar asked Aug 05 '26 09:08

mellis


1 Answers

This has changed since the original answer was posted and it is now outdated. As @alex-myers mentioned in the comments, you can use TextMate to target intellisense tokens.

For example:

"editor.tokenColorCustomizations": {
    "[Visual Studio Dark]": {
        "textMateRules": [
            {
                "scope": "variable.other.local",
                "settings": {
                    "foreground": "#FF0000",
                }
            }
        ]
    }
}

See: https://code.visualstudio.com/docs/cpp/colorization-cpp

like image 180
TheBat Avatar answered Aug 08 '26 00:08

TheBat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!