插件
vsCode 的 setting.json 配置
{
"path-autocomplete.extensionOnImport": true,
"path-autocomplete.pathMappings": {
"@":"${folder}/src"
},
"editor.tabSize": 2,
"cssrem.rootFontSize": 80,
"cssrem.wxssScreenWidth": 1920,
"editor.wordWrap": "on",
"javascript.updateImportsOnFileMove.enabled": "always",
"liveServer.settings.donotShowInfoMsg": true,
"open-in-browser.default": "Chrome",
// vetur 配置
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"wrap_attributes": "force-expand-multiline"
},
"prettyhtml": {
"printWidth": 100,
"singleQuote": false,
"wrapAttributes": false,
"sortAttributes": false
},
"prettier": {
"semi": false,
"singleQuote": true,
"printWidth": 300,
"trailingComma": "none",
"arrowParens": "avoid"
}
},
// 设置 .vue文件中,HTML代码的格式化插件
"vetur.format.defaultFormatter.html": "js-beautify-html",
"vetur.ignoreProjectWarning": true,
// eslint 配置
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"eslint.alwaysShowStatus": true,
// prettier 配置
"prettier.trailingComma": "none",
"prettier.semi": false,
// 每行文字个数超出此限制将会被迫换行
"prettier.printWidth": 300,
// 使用单引号替换双引号
"prettier.singleQuote": true,
"prettier.arrowParens": "avoid",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"liveServer.settings.CustomBrowser": "chrome",
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"diffEditor.ignoreTrimWhitespace": false,
"vue.splitEditors.layout.left": [
"script",
"scriptSetup",
"styles"
],
"vue.splitEditors.layout.right": [
"template",
"customBlocks"
],
"workbench.iconTheme": "vscode-icons",
"editor.bracketPairColorization.independentColorPoolPerBracketType": true,
"workbench.colorCustomizations": {},
"editor.guides.bracketPairs": true,
"workbench.startupEditor": "none",
"git.openRepositoryInParentFolders": "never",
"editor.maxTokenizationLineLength": 20000000000000,
"window.commandCenter": false,
"editor.minimap.enabled": false,
"js/ts.implicitProjectConfig.checkJs": true
}