vscode setting配置

在这里插入图片描述

    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": [
                    "entity.name.function", // 函数
                    "keyword.operator.sizeof" // sizeof
                ],
                "settings": {
                    "foreground": "#1fd137",
                    "fontStyle": "italic"
                }
            },
            {
                "scope": [
                    "entity.name.type", // typedef 类型
                    "storage.type.built-in.primitive.c", //自带的类型
                    "storage.type", // struct关键字
                ],
                "settings": {
                    "foreground": "#3fccd1",
                    "fontStyle": "bold"
                }
            },
            {
                "scope": [
                    "variable.other.global", //全局变量
                ],
                "settings": {
                    "foreground": "#bd9924",
                    "fontStyle": "italic"
                }
            },
            {
                "scope": [
                    "entity.name.function.preprocessor", // 宏定义
                ],
                "settings": {
                    "foreground": "#971818",
                    "fontStyle": "italic bold"
                }
            },
            {
                "scope": [
                    "variable.other.local", // 局部变量
                    "variable.parameter", // 形参
                ],
                "settings": {
                    "foreground": "#00b7ff",
                    "fontStyle": "italic"
                }
            },
            {
                "scope": [
                    "variable.other.property", // 结构体的字段
                ],
                "settings": {
                    "foreground": "#1652c2",
                    "fontStyle": "bold"
                }
            },
            {
                "scope": [
                    // "keyword", // typedef
                    "keyword.control", // if, else, return
                    "storage.modifier", // const, static
                ],
                "settings": {
                    "foreground": "#ffff00",
                    "fontStyle": "italic"
                }
            },
            {
                "scope": [
                    "constant.numeric" // 数值
                ],
                "settings": {
                    "foreground": "#22daac",
                    "fontStyle": "italic"
                }
            },
        ],
    },

修改的方法

  1. 输入命令 inspect edit editor tokens and scopes,找到元素的scopes

在这里插入图片描述
2.移动鼠标到元素,找到实际生效的scopes以及其所属的scopes
在这里插入图片描述
3. 在setting中进行修改

            {
                "scope": [
                    // "keyword", // typedef
                    "keyword.control", // if, else, return, define
                    "storage.modifier", // const, static
                ],
                "settings": {
                    "foreground": "#ffffFF",
                    "fontStyle": "italic"
                }
            },

变成了白色
在这里插入图片描述

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐