Visual Studio Code 主题编辑 PHP

Oni*_*hin 3 php themes visual-studio-code

我正在从 Notepad++ 切换到 VS Code

目前困扰我的第一件事是在文件中,PHP 标记与 DIV 元素的颜色编码相同。我想将 PHP 标签的颜色更改为某种红色。

只需使用默认的 VS Dark 主题。

TIA

Tom*_*Tom 8

您也可以在用户设置中进行此更改。我包括了一些用于加粗函数、关键字等的额外自定义...这些类型的更改应该放在用户设置文件中,而不是自定义特定的主题文件 - 因为当主题升级时,您的更改将丢失。

    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": [
                    "punctuation.section.embedded.begin.php",
                    "punctuation.section.embedded.end.php"
                ],
                "settings": {
                    "foreground": "#ff0000"
                }
            },
            {
                "scope": "keyword",
                "settings": {
                    "fontStyle": "bold"
                }
            },
            {
                "scope": "storage",
                "settings": {
                    "fontStyle": "bold"
                }
            },
            {
                "scope": "constant.language",
                "settings": {
                    "fontStyle": "bold"
                }
            },
            {
                "scope": "support.class.builtin",
                "settings": {
                    "fontStyle": "bold"
                }
            }
        ]
    }
Run Code Online (Sandbox Code Playgroud)