ScotterMonkey
ScotterMonkey

Reputation: 1054

vs code set custom color for class properties

In VS Code, settings.json file, I've changed many theme colors via workbench.colorCustomizations and editor.tokenColorCustomizations but can't find the key to use to change class property colors, if that is what you call them. In the example code below, I'm talking about the color of self.t_id_user.

class User:
    def __init__(self, t_id_user="", t_email="", t_password="", t_security_level="", t_name_first="", t_name_last="", t_enabled="", d_visit_first="", d_visit_last=""):
        self.t_id_user = t_id_user
        self.t_email = t_email

Help?

Upvotes: 3

Views: 4526

Answers (2)

Trancer
Trancer

Reputation: 809

"editor.tokenColorCustomizations":{
"textMateRules": [
    {
        "name": "Class access modifiers",
        "scope": [
            "storage.modifier",
        ],
        "settings": {
            "foreground": "#CB4B16"
        }
    }
]}

Upvotes: 0

01yildizmustafa
01yildizmustafa

Reputation: 29

You know settings way. That's why mine answer is:

"editor.tokenColorCustomizations": {"textMateRules": [
    {
       "scope": ["storage.type"],
       "settings": {"foreground": "#080",}
    }
  ]
}

Upvotes: 3

Related Questions