// 將設置放入此文件中以覆蓋默認設置 { "files.associations": { "*.vue": "vue", "*.wpy": "vue", "*.wxml": "html", "*.wxss": "css" }, "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe", "git.enableSmartCommit": true, "git.autofetch": true, "emmet.triggerExpansionOnTab": true, "emmet.showAbbreviationSuggestions": true, "emmet.showExpandedAbbreviation": "always", "emmet.includeLanguages": { "vue-html": "html", "vue": "html", "wpy": "html" }, "workbench.colorTheme": "Monokai", "git.confirmSync": false, "explorer.confirmDelete": false, "editor.fontSize": 16, "window.zoomLevel": 1, "editor.wordWrap": "on", "cssrem.rootFontSize": 75, "prettier.singleQuote": true, "editor.detectIndentation": false, "prettier.tabWidth": 4, "prettier.eslintIntegration": true, "prettier.trailingComma": "none" }
2020年版配置如下:
// 將設置放入此文件中以覆蓋默認設置 { "files.associations": { "*.vue": "vue", "*.wpy": "vue", "*.wxml": "html", "*.wxss": "css" }, "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe", "git.enableSmartCommit": true, "git.autofetch": true, "emmet.triggerExpansionOnTab": true, "emmet.showAbbreviationSuggestions": true, "emmet.showExpandedAbbreviation": "always", "emmet.includeLanguages": { "vue-html": "html", "vue": "html", "wpy": "html" }, "workbench.colorTheme": "Monokai", "git.confirmSync": false, "explorer.confirmDelete": false, "editor.fontSize": 12, "window.zoomLevel": 1, "editor.wordWrap": "on", "cssrem.rootFontSize": 75, "prettier.singleQuote": true, // vscode默認啟用了根據文件類型自動設置tabsize的選項 "editor.detectIndentation": false, // 重新設定tabsize "editor.tabSize": 4, // #值設置為true時,每次保存的時候自動格式化;值設置為false時,代碼格式化請按shift+alt+F "editor.formatOnSave": false, // #每次保存的時候將代碼按eslint格式進行修復 // "eslint.autoFixOnSave": true, // // 添加 vue 支持 // "eslint.validate": [ // "javascript", // "javascriptreact", // { // "language": "vue", // "autoFix": true // } // ], "prettier.tabWidth": 4, // "prettier.eslintIntegration": true, "prettier.trailingComma": "none", "editor.rulers": [ 120 ], //每120行就顯示一條線 // "prettier.tslintIntegration": true, // 使用tslint "search.exclude": { "**/node_modules": true, "**/bower_components": true, "**/target": true, "**/logs": true, }, // 在使用搜索功能時,將這些文件夾/文件排除在外 "files.exclude": { "**/.git": true, "**/.svn": true, "**/.hg": true, "**/CVS": true, "**/.DS_Store": true, "**/*.js": { "when": "$(basename).ts" // ts編譯后生成的js文件將不會顯示在工作空間中 }, "**/node_modules": true }, // 這些文件將不會顯示在工作空間中 "python.pythonPath": "E:\\soft\\after\\python", "[vue]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, // #讓vue中的js按"prettier"格式進行格式化 "vetur.format.defaultFormatter.html": "js-beautify-html", "vetur.format.defaultFormatter.js": "prettier", "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 } }, "[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[javascript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, }