前端vue settings.json 配置

402 阅读1分钟

{ // prettier 的配置文件存放路径,C盘->用户名->.prettierrc "prettier.configPath": "C:\Users\86150\.prettierrc", // --------------------------------------- // 路径提示 "path-intellisense.mappings": { "@": "${workspaceRoot}/src" }, // --------------------------------------- // 开启编辑器的保存自动格式化功能 "editor.formatOnSave": true, // ESLint 插件的配置 "editor.codeActionsOnSave": { "source.fixAll": true }, "eslint.alwaysShowStatus": true, // --------------------------------------- // 每行文字个数超出此限制将会被迫换行 "prettier.printWidth": 100, // 使用单引号替换双引号 "prettier.singleQuote": true, "prettier.arrowParens": "avoid", "prettier.trailingComma": "none", "prettier.semi": false, // --------------------------------------- // 设置 .vue 文件中,HTML代码的格式化插件 "vetur.format.defaultFormatter.html": "js-beautify-html", // 忽略警告信息 "vetur.ignoreProjectWarning": true, // 防止自动导入 "vetur.completion.autoImport": false, // 不验证 .vue 组件的模板结构 "vetur.validation.template": false, // vetur 默认的格式化配置项 "vetur.format.defaultFormatterOptions": { "prettier": { "trailingComma": "none", "semi": false, "singleQuote": true, "arrowParens": "avoid", "printWidth": 100 }, "js-beautify-html": { "wrap_attributes": false } }, // --------------------------------------- "[vue]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[javascript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[html]": { "editor.defaultFormatter": "vscode.html-language-features" }, "[css]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "editor.defaultFormatter": "dbaeumer.vscode-eslint", "editor.tabSize": 2, "editor.formatOnPaste": true, "editor.minimap.enabled": false, "[markdown]": { "editor.quickSuggestions": { "comments": "on", "strings": "on", "other": "on" } }, // 侧边栏位置 "workbench.sideBar.location": "right", // 主题 "workbench.colorTheme": "One Dark Pro Darker", "workbench.list.smoothScrolling": true, // 编辑器动画滚动 "editor.smoothScrolling": true, // 平滑插入动画 "editor.cursorSmoothCaretAnimation": true, // 光标动画样式 "editor.cursorBlinking": "smooth", // 光标样式 "editor.cursorStyle": "line-thin", // 自动換行 "editor.wordWrap": "on", "bracketPairColorizer.depreciation-notice": false, "window.zoomLevel": -2, "editor.lineHeight": 2 }