{
"workbench.colorTheme": "Quiet Light",
"[vue]": {
"editor.defaultFormatter": "octref.vetur"
},
//每次保存时将代码按格式修复
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": true
},
// #让vue中的js按"prettier"格式进行格式化
"vetur.format.defaultFormatter.html": "prettyhtml",
"vetur.format.defaultFormatter.js": "prettier",
"vetur.format.defaultFormatterOptions": {
"prettier": {
// 结尾无分号
"semi": false,
// 超过140个字符换行
"printWidth": 220,
// 使用单引号
"singleQuote": true,
// 无尾随逗号
"trailingComma": "none",
// 箭头函数单个参数不加分号
"arrowParens": "avoid"
},
"prettyhtml": {
"printWidth": 220
}
},
// 同上prettier格式化代码
"prettier.semi": false,
"prettier.printWidth": 220,
"prettier.trailingComma": "none",
"prettier.singleQuote": true,
"prettier.arrowParens": "avoid",
"explorer.confirmDelete": false,
"[go]": {
"editor.insertSpaces": false
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"security.workspace.trust.untrustedFiles": "open",
"terminal.integrated.enableMultiLinePasteWarning": false,
"git.confirmSync": false,
"http.proxyAuthorization": null
}不自动格式化
{
"files.associations": {
"*.vue": "vue",
"*.wpy": "vue",
"*.wxml": "html",
"*.wxss": "css"
},
// "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
"git.enableSmartCommit": true,
"git.autofetch": true,
"emmet.triggerExpansionOnTab": true,
"emmet.showAbbreviationSuggestions": true,
"emmet.showExpandedAbbreviation": "always",
"emmet.includeLanguages": {
"vue-html": "html",
"vue": "html",
"wpy": "html"
},
//主题颜色
"workbench.colorTheme": "Quiet Light",
"git.confirmSync": false,
"explorer.confirmDelete": false,
"editor.fontSize": 14,
"window.zoomLevel": 1,
"editor.wordWrap": "on",
"editor.detectIndentation": false,
// 重新设定tabsize
"editor.tabSize": 2,
//失去焦点后自动保存
"files.autoSave": "onFocusChange",
// #值设置为true时,每次保存的时候自动格式化;
"editor.formatOnSave": false,
//每120行就显示一条线
"editor.rulers": [],
// 在使用搜索功能时,将这些文件夹/文件排除在外
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/target": true,
"**/logs": true,
},
// 这些文件将不会显示在工作空间中
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/*.js": {
"when": "$(basename).ts" //ts编译后生成的js文件将不会显示在工作空中
},
"**/node_modules": true
},
// #让vue中的js按"prettier"格式进行格式化
"vetur.format.defaultFormatter.html": "js-beautify-html",
"vetur.format.defaultFormatter.js": "prettier",
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
// #vue组件中html代码格式化样式
"wrap_attributes": "force-aligned", //也可以设置为“auto”,效果会不一样
"wrap_line_length": 200,
"end_with_newline": false,
"semi": false,
"singleQuote": true
},
"prettier": {
// 结尾无分号
"semi": false,
// 超过140个字符换行
"printWidth": 220,
// 使用单引号
"singleQuote": true,
// 无尾随逗号
"trailingComma": "none",
// 箭头函数单个参数不加分号
"arrowParens": "avoid"
},
"prettyhtml": {
"printWidth": 220
}
}
}


留言评论
暂无留言