vs code 设置

VSCode首选项配置

{
    "editor.tabSize": 2,
    "files.associations": {
        "*.vue": "vue"
    },
    "eslint.autoFixOnSave": true,
    "eslint.options": {
        "extensions": [
            ".js",
            ".vue"
        ]
    },
    "eslint.validate": [
        "javascript",
        "javascriptreact",
        "vue",
        "vue-html"
    ],
    "search.exclude": {
        "**/node_modules": true,
        "**/bower_components": true,
        "**/dist": true
    },
    "emmet.syntaxProfiles": {
        "javascript": "jsx",
        "vue": "html",
        "vue-html": "html"
    },
    "vetur.validation.template": false,//vue中的v-for提示 加上v-bind:key
    "extensions.autoUpdate": true,
    "editor.renderWhitespace": "boundary",
    "editor.cursorBlinking": "smooth",
    "workbench.welcome.enabled": true,
    //设置es6允许有分号
     'semi': ['error', 'always'],
    //设置Tab几个空格
    "editor.tabSize": 2,
"vetur.format.defaultFormatterOptions": {
    "prettier": {
      "semi": false,
      "singleQuote": true
    }
  }
}

以下为stylus配置

"stylusSupremacy.insertColons": false, // 是否插入冒号
"stylusSupremacy.insertSemicolons": false, // 是否插入分号
"stylusSupremacy.insertBraces": false, // 是否插入大括号
"stylusSupremacy.insertNewLineAroundImports": false, // import之后是否换行
"stylusSupremacy.insertNewLineAroundBlocks": false // 两个选择器中是否换行
"editor.formatOnType": true,// 控制编辑器是否应在键入后自动设置行的格式
"clang-format.formatOnSave": true,//保存时自动格式化
"vetur.format.defaultFormatter.js":"vscode-typescript",

eslint配置加上:

// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
// disallow unnecessary parentheses
'no-extra-parens': ['error', 'all', {'nestedBinaryExpressions': false}],
'eol-last': 0,
'space-before-function-paren': 0,
'space-before-function-paren': 'off'

插件列表

Prettier - Code formatter

"prettier.singleQuote": true,
    "prettier.semi": false,

Auto Close Tag自动闭合HTML标签
Auto Rename Tag修改HTML标签时,自动修改匹配的标签
Bookmarks添加行书签
Can I UseHTML5、CSS3、SVG的浏览器兼容性检查
Code Runner运行选中代码段(支持大量语言,包括Node)
CodeBing 在VSCode中弹出浏览器并搜索,可编辑搜索引擎
Color Highlight 颜色值在代码中高亮显示
Color Picker 拾色器
Document This注释文档生成
EditorConfig for VS CodeEditorConfig插件
Emoj在代码中输入emoji
ESLintESLint插件,高亮提示
File Peek根据路径字符串,快速定位到文件
Font-awesome codes for html FontAwesome提示代码段
ftp-sync同步文件到ftp
Git Blame在状态栏显示当前行的Git信息
Git History(git log)查看git log
GitLens显示文件最近的commit和作者,显示当前行commit信息
Guides高亮缩进基准线
Gulp SnippetsGulp代码段
HTML CSS Class CompletionCSS class提示
HTML CSS Supportcss提示(支持vue)
HTMLHint HTML格式提示
Indenticator缩进高亮
JavaScript (ES6) code snippets ES6语法代码段
language-stylusStylus语法高亮和提示
Lodash Lodash代码段
markdownlintMarkdown格式提示
MochaSnippetsMocha代码段
Node modules resolve快速导航到Node模块
npm运行npm命令
npm Intellisense导入模块时,提示已安装模块名称
Output Colorizer 彩色输出信息
Partial Diff对比两段代码或文件
Path Autocomplete 路径完成提示
Path Intellisense另一个路径完成提示
Prettify JSON格式化JSON
Project Manager快速切换项目
REST Client发送REST风格的HTTP请求
Settings Sync VSCode设置同步到Gist
String Manipulation 字符串转换处理(驼峰、大写开头、下划线等等)
Test Spec Generator 测试用例生成(支持chai、should、jasmine)
TODO ParserTodo管理
Version Lens package.json文件显示模块当前版本和最新版本
vetur目前比较好的Vue语法高亮
View Node Package 快速打开选中模块的主页和代码仓库
vscode-icons 文件图标,方便定位文件
VSCode Great Icons文件图标拓展
VueHelperVue2代码段(包括Vue2 api、vue-router2、vuex2)

你可能感兴趣的:(vs code 设置)