{
"workbench.colorTheme": "One Dark Pro",
"workbench.iconTheme": "material-icon-theme",
"workbench.productIconTheme": "feather-vscode",
"files.autoSave": "onFocusChange",
"editor.fontSize": 16, // 设置字体
"editor.tabSize": 2, // 设置tab位2个空格,设置后在页面可查看.
"editor.tabCompletion": "on", // 用来在出现推荐值时,按下Tab键是否自动填入最佳推荐值
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
},
"editor.lineNumbers": "on", // 设置代码行号
"editor.formatOnSave": true,
"explorer.confirmDelete": false,
// #让vue中的js按"prettier"格式进行格式化
"vetur.format.defaultFormatter.html": "js-beautify-html",
"vetur.format.defaultFormatter.js": "prettier-eslint",
"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,
"singleQuote": true,
"editor.tabSize": 2
},
"prettyhtml": {
"printWidth": 160,
"singleQuote": false,
"wrapAttributes": false,
"sortAttributes": false
}
},
"[vue]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
}
}
标签:workbench,false,vscode,配置,js,html,editor,prettier
From: https://www.cnblogs.com/lwlblog/p/18007442