Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 652
ScotterMonkey Avatar asked May 29 '26 15:05

ScotterMonkey


1 Answers

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

"editor.tokenColorCustomizations": {"textMateRules": [
    {
       "scope": ["storage.type"],
       "settings": {"foreground": "#080",}
    }
  ]
}
like image 157
01yildizmustafa Avatar answered Jun 01 '26 19:06

01yildizmustafa



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!