{ "workbench.colorTheme": "Dark-Dracula", "workbench.iconTheme": "vscode-icons", "editor.tabSize": 2, "files.autoSaveDelay": 4, "editor.formatOnSave": true, "window.zoomLevel": 0, "workbench.statusBar.visible": true, "vetur.format.defaultFormatter.html": "js-beautify-html", "prettier.singleQuote": true, "vetur.format.defaultFormatter.js": "prettier", "prettier.semi": false, "prettier.proseWrap": "preserve", // 是否要换行 "vetur.validation.template": true, "vetur.format.defaultFormatterOptions": { "js-beautify-html": { "wrap_line_length": 120, "wrap_attributes": "auto", "end_with_newline": false } } }
打开file --prefrence- settings 像上面如下设置
"vetur.format.defaultFormatter.js": "prettier",
"prettier.proseWrap": "preserve", // 是否要换行
比较重要
记得配置完要重启一下vscode