本人vscode setting.json配置
程序员文章站
2022-06-26 12:07:07
...
{
"window.zoomLevel": 1,
"files.autoSave": "off",
"vsicons.presets.hideFolders": true,
"vsicons.presets.foldersAllDefaultIcon": true,
"vsicons.dontShowNewVersionMessage": true,
"eslint.enable": false,
// 在其他建议上方显示代码片段建议。
"editor.snippetSuggestions": "top",
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": true
},
"editor.formatOnPaste": true, // 自动格式化粘贴进来的内容
"editor.suggest.snippetsPreventQuickSuggestions": false,
"files.associations": { //HTML Snippets代码补全
"*.vue": "vue",
},
"emmet.triggerExpansionOnTab": true,
"emmet.includeLanguages": {
"vue-html": "html",
"vue": "html"
},
"editor.fontSize": 15,
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"[css]": {
"editor.defaultFormatter": "michelemelluso.code-beautifier"
},
// "editor.codeActionsOnSave": null,
"vetur.grammar.customBlocks": {
"docs": "md",
"i18n": "json"
},
"vetur.format.defaultFormatter.html": "prettier",
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"wrap_attributes": "auto"
},
"prettier": {
"printWidth": 200, // 超过最大值换行"
"semi": true, // 加分号
"singleQuote": true, // 用单引号
"trailingComma": "none" //禁止随时添加逗号
},
"prettyhtml": {
"printWidth": 100,
"singleQuote": false,
"wrapAttributes": false,
"sortAttributes": false
}
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[less]": {
"editor.defaultFormatter": "michelemelluso.code-beautifier"
},
"[vue]": {
"editor.defaultFormatter": "octref.vetur"
},
"[javascript]": {
"editor.defaultFormatter": "HookyQR.beautify"
},
"vetur.validation.template": false, //检测语法template
"editor.formatOnSave": true,
"git.ignoreWindowsGit27Warning": true,
"css.fileExtensions": [
"css",
"scss"
], // 保存时格式化
}