tokyo-night / tokyo-night-vscode-theme

A clean, dark Visual Studio Code theme that celebrates the lights of Downtown Tokyo at night.
MIT License
1.8k stars 119 forks source link

Golang variable name color #30

Closed jon4hz closed 3 years ago

jon4hz commented 3 years ago

In golang a variable name gets colored with #bb9af7 instead of #c0caf5 when you declare it with the "var" keyword. Example: var testVariable string. If you use a short assignment statement like testVariable := "Hello World" the variable name gets the correct color.

enkia commented 3 years ago

That's my intention. I want variable declarations to be purple and then those same variables in use being white. It helps me scan code easier.

I can see how that may not be everyone's taste and may not be the norm / correct way. This is my daily theme, though, so there is no incoming fix to the published theme. You can add a line to your settings.json to change that to white:

"editor.tokenColorCustomizations": {
    "[Tokyo Night Storm]": { // Name of Theme
        "textMateRules": [
            {
                "scope": "meta.definition.variable variable.other.constant",
                "settings": {
                    "foreground": "#C0CAF5"
                }
            },
        ]
    },
}

Let me know if that helps.

jon4hz commented 3 years ago

Fair enough. Thanks for the explanation and "fix". I'll test what works best for me :)