Add an operator to visual studio code theme in settings.json

南笙酒味 提交于 2019-12-05 15:49:36

As the Developer: Inspect TM scopes command shows, the and, or and not operators don't use the keyword.operator.word scope - instead, they use keyword.operator.lua:

Consequently, the following works:

"editor.tokenColorCustomizations": {
    "textMateRules": [
        {
            "scope": "keyword.operator.lua",
            "settings": {
                "foreground": "#569BD2"
            }
        }
    ]
}

Note that the scope name doesn't specify what kind of operator it is, so this will apply to all operators, not just and, or and not. The only way to change this is to modify the language grammar / TmLanguage file itself, which is shipped with VSCode in the case of Lua.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!