{
// vscode默认启用了根据文件类型自动设置tabsize的选项
"editor.detectIndentation": false,
// 重新设定tabsize
"editor.tabSize": 2,
//
"editor.formatOnSave": true,
//
"eslint.autoFixOnSave": true,
// 添加 vue 支持
"eslint.validate": [
"javascript",
"javascriptreact",
{
"language": "vue",
"autoFix": true
}
],
//
"prettier.eslintIntegration": true,
//
"prettier.semi": false,
//
"prettier.singleQuote": true,
//
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
//
"vetur.format.defaultFormatter.html": "js-beautify-html",
//
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"wrap_attributes": "force-aligned"
//
}
},
// 格式化stylus, 需安装Manta's Stylus Supremacy插件
"stylusSupremacy.insertColons": false, // 是否插入冒号
"stylusSupremacy.insertSemicolons": false, // 是否插入分号
"stylusSupremacy.insertBraces": false, // 是否插入大括号
"stylusSupremacy.insertNewLineAroundImports": false, // import之后是否换行
"stylusSupremacy.insertNewLineAroundBlocks": false // 两个选择器中是否换行
}
常用插件
1、函数注释 Ctrl+Alt+D 两次
Document This
2、代码规范
Eslint
3、vscode中文
chinese
4、vscode 文件图标
vscode-icons
5、Vetur
6、插件大小
filesize
6、括号高亮
Bracket Pair Colorizer
6、自动更改标签名
Auto Rename Tag