可直接复制,进入vscode文件中的setting替换
温馨提示:文章后面有图提示怎么找到setting文件
{ // 文件图标 "workbench.iconTheme": "vscode-icons", // vscode 全局字体大小 "window.zoomLevel": 1, // vscode 代码字体大小 "editor.fontSize": 14, "diffEditor.ignoreTrimWhitespace": false, // 每次保存的时候自动格式化 "editor.formatOnSave": false, // vscode默认启用了根据文件类型自动设置tabsize的选项 "editor.detectIndentation": false, // 空格键所占字符数 "editor.tabSize": 2, "javascript.preferences.quoteStyle": "double", "typescript.preferences.quoteStyle": "double", // 预览模式关闭 "workbench.editor.enablePreview": true, // 自动修复 "editor.codeActionsOnSave": { "source.fixAll.eslint": true }, // vue 格式 格式化插件 "[vue]": { "editor.defaultFormatter": "octref.vetur" }, // json格式 格式化插件 "[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, // js格式 格式化插件 "[javascript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, // 配置 ESLint 检查的文件类型 "eslint.validate": ["javascript", "vue", "html", "javascriptreact"], // 指定 vscode 的 eslint 所处理的文件的后缀 "eslint.options": { "extensions": [".js", ".vue", ".ts", ".jsx", ".tsx"] }, "git.enableSmartCommit": true, "editor.quickSuggestions": { "strings": true }, "vetur.format.defaultFormatterOptions": { "prettier": { // 格式化不加分号 "semi": false, // 格式化以单引号为主 "singleQuote": true }, "js-beautify-html": { "wrap_attributes": "force-aligned", "wrap_line_length": 200, "wrap_width_line": false, "semi": false, "singleQuote": true }, "prettyhtml": { "singleQuote": false, "wrapAttributes": false, "sortAttributes": true } }, "vetur.format.defaultFormatter.html": "js-beautify-html", "vetur.format.defaultFormatter.js": "prettier", "javascript.updateImportsOnFileMove.enabled": "never", "javascript.implicitProjectConfig.experimentalDecorators": true, "workbench.editor.showTabs": true, "gitlens.advanced.messages": { "suppressCommitHasNoPreviousCommitWarning": false, "suppressCommitNotFoundWarning": false, "suppressFileNotUnderSourceControlWarning": false, "suppressGitVersionWarning": false, "suppressLineUncommittedWarning": false, "suppressNoRepositoryWarning": false, "suppressResultsExplorerNotice": false, "suppressShowKeyBindingsNotice": true, "suppressUpdateNotice": false, "suppressWelcomeNotice": true }, "gitlens.keymap": "alternate", "gitlens.views.lineHistory.enabled": true, // 文件折叠控制 "explorer.compactFolders": false, // 代码自动换行 "editor.wordWrap": "on", "[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[css]": { "editor.defaultFormatter": "HookyQR.beautify" }, "[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[markdown]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[html]": { "editor.defaultFormatter": "HookyQR.beautify" }, "[scss]": { "editor.defaultFormatter": "HookyQR.beautify" }, "files.associations": { "*.cjson": "jsonc", "*.wxss": "css", "*.wxs": "javascript" }, "emmet.includeLanguages": { "wxml": "html" }, "[javascriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[less]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "settingsSync.ignoredExtensions": [], "workbench.startupEditor": "newUntitledFile", "editor.semanticTokenColorCustomizations": null, "editor.suggest.filterGraceful": false, "editor.suggest.snippetsPreventQuickSuggestions": false, "settingsSync.ignoredSettings": [] }