govisual-studio-codeide-customizationvs-color-theme-editor

VSCode Color Theme customization for golang method-parameters


I'm trying to find a way to color 'foo', 'a' and 'b' in VSCode (language: golang):

func (foo *Foobar) Subscribe(a string, b int) {
    logger.Log(a)
    logger.Log(b)
}

How can I go about achieving this? I have tried editing settings.json and added this:

    [...]
    "workbench.colorTheme": "Slack Theme Dark Mode",
    "editor.tokenColorCustomizations": {
        "[Slack Theme Dark Mode]": {
            "textMateRules": [
                {
                    "scope": "variable.parameter.function",
                    "settings": {
                        "foreground": "#e21313"
                    }
                }
            ]
        },        
}

The parameters don't pick up the color I set.


Solution

  • Unfortunately it's not supported, all you can do is highlight source.go.