美文网首页
vscode工具配置

vscode工具配置

作者: web5 | 来源:发表于2020-02-21 12:33 被阅读0次

    参考文章
    https://www.jianshu.com/p/6356f67d7dce

    {
      "git.ignoreLimitWarning": true,
      "cssrem.fixedDigits": 2,
      "cssrem.rootFontSize": 75,
      "window.zoomLevel": 1,
      "[json]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
      },
      "[javascript]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
      },
      "workbench.iconTheme": "material-icon-theme",
      // "workbench.colorTheme": "Visual Studio Light",
      "workbench.startupEditor": "newUntitledFile",
      "[html]": {
        "editor.defaultFormatter": "vscode.html-language-features"
      },
      "terminal.integrated.rendererType": "dom",
      "vetur.format.defaultFormatterOptions": {
        "js-beautify-html": {
          "wrap_attributes": "auto"
        }
      },
      "emmet.triggerExpansionOnTab": true,
      // vscode默认启用了根据文件类型自动设置tabsize的选项
      "editor.detectIndentation": false,
      // 重新设定tabsize
      "editor.tabSize": 2,
      // #每次保存的时候自动格式化
      "editor.formatOnSave": true,
      // #每次保存的时候将代码按eslint格式进行修复
      "eslint.autoFixOnSave": true,
      // 添加 vue 支持
      "eslint.validate": [
        "javascript",
        "javascriptreact",
        {
          "language": "vue",
          "autoFix": true
        }
      ],
      //  #去掉代码结尾的分号
      "prettier.semi": false,
      //  #使用带引号替代双引号
      "prettier.singleQuote": true,
      //  #让函数(名)和后面的括号之间加个空格
      "javascript.format.insertSpaceBeforeFunctionParenthesis": true,
      // #这个按用户自身习惯选择
      "vetur.format.defaultFormatter.html": "js-beautify-html",
      // #让vue中的js按编辑器自带的ts格式进行格式化
      "vetur.format.defaultFormatter.js": "vscode-typescript",
      "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
      }
    }
    

    新增配置文章【20200807】
    https://juejin.im/post/6844903842761408520

    相关文章

      网友评论

          本文标题:vscode工具配置

          本文链接:https://www.haomeiwen.com/subject/wxhcqhtx.html