当前位置:   article > 正文

【无标题】vscode setting配置

【无标题】vscode setting配置

记录自己的vscode配置,会不断优化

{
  "editor.fontSize": 20,
  "editor.tabSize": 2, // 缩进大小
  "editor.guides.bracketPairs": "active", // 在括号之间显示匹配的光标导航线
  "editor.formatOnType": true,
  "editor.formatOnSave": true,
  "editor.formatOnPaste": true,
  "editor.codeActionsOnSave": {
    // 在保存文件时执行的代码操作
    "source.fixAll.eslint": "explicit",
    "source.fixAll.tslint": "explicit",
    "source.fixAll.stylelint": "explicit",
    "source.fixAll": "explicit" // 执行所有可用的修复操作
  },
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "vue",
    "typescript",
    "typescriptreact",
    "html",
    "css",
    "scss",
    "less",
    "mpx",
    "json",
    "markdown",
    "jsp"
  ],
  "stylelint.validate": ["css", "less", "postcss", "scss", "sass", "vue"],
  // ==========todo-tree==========
  //todo-tree 标签配置  标签兼容大小写字母(很好的功能!!!)
  "todo-tree.regex.regex": "((%|#|//|<!--|^\\s*\\*)\\s*($TAGS)|^\\s*- \\[ \\])",
  "todo-tree.regex.regexCaseSensitive": false,
  //添加自定义的标签成员,将在下面实现它们的样式
  "todo-tree.general.tags": [
    "todo", //todo代办
    "bug", //bug必须要修复的BUG
    "tag", //tag标签
    "done", //done已完成
    "mark", //mark标记一下
    "test", //test测试代码
    "update" //update优化升级点
  ],
  "todo-tree.highlights.customHighlight": {
    "todo": {
      "icon": "alert", //标签样式
      "background": "#c9c552", //背景色
      "rulerColour": "#c9c552", //外框颜色
      "iconColour": "#c9c552" //标签颜色
    },
    "bug": {
      "background": "#eb5c5c",
      "icon": "bug",
      "rulerColour": "#eb5c5c",
      "iconColour": "#eb5c5c"
    },
    "tag": {
      "background": "#38b2f4",
      "icon": "tag",
      "rulerColour": "#38b2f4",
      "iconColour": "#38b2f4",
      "rulerLane": "full"
    },
    "done": {
      "background": "#5eec95",
      "icon": "check",
      "rulerColour": "#5eec95",
      "iconColour": "#5eec95"
    },
    "mark": {
      "background": "#f90",
      "icon": "note",
      "rulerColour": "#f90",
      "iconColour": "#f90"
    },
    "test": {
      "background": "#df7be6",
      "icon": "flame",
      "rulerColour": "#df7be6",
      "iconColour": "#df7be6"
    },
    "update": {
      "background": "#d65d8e",
      "icon": "versions",
      "rulerColour": "#d65d8e",
      "iconColour": "#d65d8e"
    }
  },
  // ==========todo-tree==========
  // ==========fileheader==========
  // 头部注释
  "fileheader.customMade": {
    "Author": "dylin&&zddbic@outlook.com", // 同时获取用户名与邮箱
    "Date": "Do not edit", // 文件创建时间(不变)
    "LastEditors": "dylin&&zddbic@outlook.com", // 文件最后编辑者 与Author字段一致
    "LastEditTime": "Do not edit", // 文件最后编辑时间
    "Description": ""
  },
  // 函数注释
  "fileheader.cursorMode": {
    "description": "", // 函数注释生成之后,光标移动到这里
    "param": "", // param 开启函数参数自动提取 需要将光标放在函数行或者函数上方的空白行
    "return": ""
  },
  "fileheader.configObj": {
    "autoAdd": false, // 自动添加头部注释开启才能自动添加
    // "autoAlready": true, // 默认开启
    // "supportAutoLanguage": [], // 设置过后只有该数组里面的文件 才会自动添加头部注释
    "prohibitAutoAdd": ["json", "md"] // 禁止.json .md文件,自动添加头部注释
  },
  // ==========fileheader==========
  "prettier.singleQuote": true, // 使用单引号代替双引号(jsp文件里使用双引号||``||${}可能有问题.垃圾)
  "[jsonc]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[html]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "vue3snippets.printWidth": 120,
  "prettier.printWidth": 120
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/AllinToyou/article/detail/293989
推荐阅读
相关标签
  

闽ICP备14008679号