方式一:

使用快捷键 Ctrl+Shift+P 打开 settings.json 文件,添加如下内容:

"workbench.colorCustomizations": {
    "tab.activeBackground": "#00b7ff9d",
    "editor.lineHighlightBackground": "#ffd00033"
},
"editor.semanticTokenColorCustomizations": {
    "enabled": true,   // enable for all themes
    "rules": {
        "property": {
            "foreground": "#10ec98",
            "fontStyle": "bold"
        },
        "macro": {
            "foreground": "#569CD6",
            "fontStyle": "bold"
        },
        "function": {
            "foreground":  "#bacf43",
            "fontStyle": "bold"
        },
        "variable.global": {
            "foreground": "#9cdcfe",
            "fontStyle": "bold"
        },
        "variable.local": {
            "foreground": "#9cdcfe",
            "fontStyle": "italic" //斜体
        },
        "enumMember": {
            "foreground": "#ec106c",
            "fontStyle": "bold"
        },
    }
}

方式二,如下:

    "editor.tokenColorCustomizations": {
        "comments": "#55aa7f",     // 注释
        "keywords": "#569CD6",     // 关键字
        "variables": "#5eccf8",    // 变量名 函数的参数名 
        "strings": "#00ff7f",      // 字符串
        "functions": "#ffbb00",    // 自定义及内置的函数
        "numbers": "#00eeff",      // 数字
        "types": "#55bbff",        // 类定义颜色
        "textMateRules": [  
        { // 设置左单双引号的颜色
            "scope": "punctuation.definition.string.begin",
            "settings": {
                "foreground": "#00ff7f",
                "fontStyle": "bold"  //加粗
            }
        },
        { //设置右单双引号的颜色
            "scope": "punctuation.definition.string.end",
            "settings": {
                "foreground": "#00ff7f",
                "fontStyle": "bold"
            }
        },
        ]
    }

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐