vscode配置,vue开发环境
安装插件Vetur,Regex Previewer,Pretty Formatter,Path Intellisense,ESLint,chinese,beautify
//setting.js文件
{
"emmet.triggerExpansionOnTab": true,
"emmet.includeLanguages": {
"vue-html": "html",
"vue": "html"
},
"eslint.codeAction.showDocumentation": {
"enable": true
},
"editor.tabSize": 2,
//失去焦点后自动保存
"files.autoSave": "onFocusChange",
// #值设置为true时,每次保存的时候自动格式化;
"editor.formatOnSave": true,
"editor.formatOnType": true,
//每120行就显示一条线
"editor.rulers": [],
"eslint.options": {
"plugins": [
"html"
]
},
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"emmet.excludeLanguages": [
"markdown"
],
"typescript.validate.enable": false,
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"wrap_line_length": 160, // 数值越大,一行放的属性越多
"wrap_attributes": "auto",
"end_with_newline": false
},
"prettyhtml": {
"printWidth": 100,
"singleQuote": false,
"wrapAttributes": false,
"sortAttributes": false
}
},
"vetur.format.defaultFormatter.html": "js-beautify-html",
"vetur.format.defaultFormatter.js": "vscode-typescript",
"editor.quickSuggestions": true,
"eslint.nodeEnv": "",
"editor.fontSize": 16,
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
"js/ts.implicitProjectConfig.checkJs": true,
"typescript.format.insertSpaceBeforeAndAfterBinaryOperators": false,
"typescript.format.insertSpaceBeforeFunctionParenthesis": true,
"path-intellisense.mappings": {
"@": "${workspaceRoot}/src"
},
"editor.codeActionsOnSave": null
// "npm.exclude": "",
// "[scss]": {
// "editor.defaultFormatter": "HookyQR.beautify"
// },
// "beautify.config": ""
}