fisheva / Eva-Theme

A comfortable and semantic theme.
https://marketplace.visualstudio.com/items?itemName=fisheva.eva-theme
MIT License
452 stars 38 forks source link

React components color #77

Closed ghost closed 2 years ago

ghost commented 2 years ago

Hi, how can I change the color of react components? Now JSX elements and components are red, it's not very convenient

image

fisheva commented 2 years ago

All theme plugins add color to characters based on their scope value. You can check the scope value of all characters by pressing Ctrl+Shift+P (Windows) or Cmd+Shift+P (Mac) and selecting Inspect Editor Tokens and Scopes. Then adjust their color in settings.

企业微信20220605-174902@2x 企业微信20220605-173401@2x
"editor.tokenColorCustomizations": {
        //control Eva Dark only
        "[Eva Dark]": {
            "textMateRules": [
                {
                    "scope": "support.class.component",
                    "settings": {
                        "foreground": "#ff0000",
                        "fontStyle": "bold"
                    },
                },
            ],
        },
        //control all Themes
        "textMateRules": [
            {
                "scope": "support.class.component",
                "settings": {
                    "foreground": "#00ff00",
                    "fontStyle": "bold"
                },
            },
        ],
    },

Official documentation: https://code.visualstudio.com/docs/getstarted/themes

ghost commented 2 years ago

Thanks!