04-Vscode-setting设置

https://www.cnblogs.com/zhurong/p/12766148.html

修改代码显示颜色:

  "editor.tokenColorCustomizations": {
        "comments": "#6a6a6a", // 注释
          "keywords": "#f475fd", // 关键字
          "variables": "#b2b39f", // 变量名
          "strings": "#db6c11b0", // 字符串
          "functions": "#69e42cc9", // 函数名
          "numbers": "#4ea7df" // 数字
      },
      // 选中高亮的颜色
      "workbench.colorCustomizations": {
          "editor.selectionBackground": "#ec4f4f"
      },

 一份完整的setting配置:

{
    "editor.wordWrap": "on", 
    "window.zoomLevel": -1,
    "[csharp]": {
        "editor.defaultFormatter": "Leopotam.csharpfixformat"
    },
    "editor.minimap.enabled": false,
    "workbench.colorCustomizations": {
        // "editorLineNumber.foreground": "#17a346",
        // "editorGutter.background": "#0fcf65",
        // 光标颜色
        "editorCursor.foreground": "#f70f22",
        "editor.lineHighlightBackground": "#0D4642",
        "editor.lineHighlightBorder": "#00000000",
        // 相同内容高亮背景颜色
        "editor.selectionHighlightBackground": "#0d54ec",
        // 选中内容的背景颜色
        // "editor.selectionBackground": "#f8f81d",
        // 当前搜索匹配的背景颜色
        "editor.findMatchBackground": "#913c58",
        // 其他搜索匹配的背景颜色
        "editor.findMatchHighlightBackground": "#0000",
        "editor.wordHighlightBackground": "#e27202de",
        // 匹配括号框的颜色
        "editorBracketMatch.border": "#00ff22",
        // 匹配括号的背景颜色
        "editorBracketMatch.background": "#0052cc",
        // 编辑器活动缩进参考线的颜色
        "editorIndentGuide.activeBackground":"#a14578",
        // 当前选项卡背景颜色
        "tab.activeBackground": "#083cac",
        "highlight-icemode.borderColor": "#FF0000",
    },
    "editor.quickSuggestions": {
        "strings": true
    },
    "window.restoreWindows": "all",
    "sync.gist": "df06ef32235644639ff7ba0e203a8f3c",
    "workbench.editor.enablePreview": false,
    "breadcrumbs.enabled": true,
    "editor.renderWhitespace": "all",
    "[json]": {
        "editor.defaultFormatter": "HookyQR.beautify"
    },
    "[html]": {
        "editor.defaultFormatter": "vscode.html-language-features"
    },

}

 安装Eslint + Prettier - Code formatter后:

setting中设置:

    "editor.formatOnType": true, 
    "editor.formatOnSave": true,

即可保存时候自动按照ESLint语法格式格式化代码

 

posted @ 2021-05-04 17:24  猎奇游渔  阅读(277)  评论(0编辑  收藏  举报