关于vscode插件:vscode配置

28次阅读

共计 1148 个字符,预计需要花费 3 分钟才能阅读完成。

{
    // 主动换行
    "editor.wordWrap": "on",
    // vscode 默认启用了依据文件类型主动设置 tabsize 的选项
    "editor.detectIndentation": false,
    // 从新设定 tabsize
    "editor.tabSize": 2,
    // #每次保留的时候主动格式化
    "editor.formatOnSave": true,
    //  #让函数 (名) 和前面的括号之间加个空格
    "javascript.format.insertSpaceBeforeFunctionParenthesis": true,
    // #这个按用户本身习惯抉择
    "vetur.format.defaultFormatter.html": "js-beautify-html",
    // #让 vue 中的 js 按编辑器自带的 ts 格局进行格式化
    "vetur.format.defaultFormatter.js": "vscode-typescript",
    // 增加 emmet 反对 vue 文件
    "emmet.includeLanguages": {
      "wxml": "html",
      "vue": "html"
    },
    // 给 js-beautify-html 设置属性隔断
    "vetur.format.defaultFormatterOptions": {
      "js-beautify-html": {
        "wrap_attributes": "auto",
        "wrap_line_length": 200,
        "end_with_newline": false
      },
      "prettyhtml": {
        "printWidth": 200,
        "singleQuote": false,
        "wrapAttributes": false,
        "sortAttributes": false
      },
      "prettier": {
        "semi": false,
        "singleQuote": true
      }
    },
    // style 默认偏移一个 indent
    "vetur.format.styleInitialIndent": true,
    // 定义匿名函数的函数关键字前面的空格解决。"javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": true,
    // 定义函数参数括号前的空格解决形式。"typescript.format.insertSpaceBeforeFunctionParenthesis": true,
    "vetur.ignoreProjectWarning": true,
    "explorer.confirmDelete": false,
    "editor.fontLigatures": null,
    "editor.showFoldingControls": "always"
  }

正文完
 0