settings.json 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. {
  2. "typescript.tsdk": "./node_modules/typescript/lib",
  3. //===========================================
  4. //============= Editor ======================
  5. //===========================================
  6. "explorer.openEditors.visible": 0,
  7. "editor.minimap.renderCharacters": false,
  8. "editor.minimap.maxColumn": 300,
  9. "editor.minimap.showSlider": "always",
  10. "editor.smoothScrolling": true,
  11. "editor.cursorBlinking": "phase",
  12. "editor.cursorSmoothCaretAnimation": true,
  13. "editor.detectIndentation": false, // vscode默认启用了根据文件类型自动设置tabsize的选项
  14. "diffEditor.ignoreTrimWhitespace": false,
  15. "editor.formatOnPaste": true, //自动格式化粘贴的内容
  16. "editor.formatOnSave": true, //保存自动格式化
  17. "editor.suggestSelection": "first",
  18. "editor.trimAutoWhitespace": true,
  19. "editor.quickSuggestions": {
  20. // 快速提示
  21. "other": true,
  22. "comments": true,
  23. "strings": true
  24. },
  25. //===========================================
  26. //============= Other =======================
  27. //===========================================
  28. "breadcrumbs.enabled": true, // 启用/禁用导航路径
  29. "open-in-browser.default": "chrome", // 默认浏览器
  30. //===========================================
  31. //============= emmet =======================
  32. //===========================================
  33. "emmet.triggerExpansionOnTab": true, // 配置emmet是否启用tab展开缩写
  34. "emmet.showAbbreviationSuggestions": true,
  35. "emmet.showExpandedAbbreviation": "always",
  36. "emmet.syntaxProfiles": {
  37. // 配置emmet对文件类型的支持,比如vue后缀文件按照html文件来进行emmet扩写
  38. "vue-html": "html",
  39. "vue": "html",
  40. "javascript": "javascriptreact",
  41. // xml类型文件默认都是单引号,开启对非单引号的emmet识别
  42. "xml": {
  43. "attr_quotes": "single"
  44. }
  45. },
  46. "emmet.includeLanguages": {
  47. // 在react的jsx中添加对emmet的支持
  48. "jsx-sublime-babel-tags": "javascriptreact"
  49. },
  50. //===========================================
  51. //============= files =======================
  52. //===========================================
  53. // "files.autoSave": "onWindowChange", // 窗口失去焦点自动保存
  54. // "files.autoSaveDelay": 1000, // 自动保存时间
  55. "files.trimTrailingWhitespace": true, // 启用后,将在保存文件时剪裁尾随空格。
  56. // 文件末尾插入新行
  57. "files.insertFinalNewline": true,
  58. // 删除文件末尾多余的新行
  59. "files.trimFinalNewlines": true,
  60. "files.eol": "\n",
  61. "search.exclude": {
  62. // 搜索排除这些区域
  63. "**/node_modules": true,
  64. "**/*.log": true,
  65. "**/*.log*": true,
  66. "**/bower_components": true,
  67. "**/dist": true,
  68. "**/elehukouben": true,
  69. "**/.git": true,
  70. "**/.gitignore": true,
  71. "**/.svn": true,
  72. "**/.DS_Store": true,
  73. "**/.idea": true,
  74. "**/.vscode": false,
  75. "**/yarn.lock": true,
  76. "**/tmp": true
  77. },
  78. "files.exclude": {
  79. // 排除文件搜索区域,比如node_modules(默认设置已经屏蔽了)
  80. // "**/node_modules": true,
  81. "**/bower_components": true,
  82. "**/.idea": true,
  83. "**/yarn.lock": true,
  84. "**/tmp": true,
  85. "**/.git": true,
  86. "**/.svn": true,
  87. "**/.hg": true,
  88. "**/CVS": true,
  89. "**/.DS_Store": true
  90. },
  91. "files.watcherExclude": {
  92. // 文件监视排除
  93. "**/.git/objects/**": true,
  94. "**/.git/subtree-cache/**": true,
  95. "**/.vscode/**": true,
  96. "**/node_modules/**": true,
  97. "**/tmp/**": true,
  98. "**/bower_components/**": true,
  99. "**/dist/**": true,
  100. "**/yarn.lock": true
  101. },
  102. "files.associations": {
  103. // 配置文件关联,以便启用对应的智能提示,比如wxss使用css
  104. "*.vue": "vue",
  105. "*.wxss": "css"
  106. },
  107. "stylelint.enable": true,
  108. "stylelint.packageManager": "yarn",
  109. "css.validate": true,
  110. "less.validate": true,
  111. "scss.validate": true,
  112. // ↓↓↓↓↓↓↓↓↓↓↓↓↓ 以下为插件设置 ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
  113. // ↓↓↓↓↓↓↓↓↓↓↓↓↓ 需要安装对应的插件 ↓↓↓↓↓↓↓↓↓↓↓↓
  114. // ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
  115. // ===========================================
  116. // ================ Eslint ===================
  117. // ===========================================
  118. "eslint.enable": true, // 是否开启eslint
  119. "eslint.options": {
  120. // 配置
  121. "plugins": ["html", "vue", "javascript", "jsx", "typescript"]
  122. },
  123. "eslint.autoFixOnSave": true, // 保存自动格式化
  124. // ===========================================
  125. // ================ Vetur ====================
  126. // ===========================================
  127. "vetur.format.options.tabSize": 2,
  128. "vetur.format.defaultFormatter.html": "js-beautify-html", // 使用js-beautify-html格式化
  129. "vetur.format.defaultFormatter.scss": "prettier", // 使用js-beautify-html格式化
  130. "vetur.format.defaultFormatter.css": "prettier", // 使用js-beautify-html格式化
  131. // "vetur.format.defaultFormatter.html": "prettyhtml",
  132. "vetur.format.defaultFormatter.js": "prettier",
  133. // "vetur.useWorkspaceDependencies": true,
  134. "vetur.format.defaultFormatterOptions": {
  135. "js-beautify-html": {
  136. // "wrap_attributes": "force-aligned", // 单行
  137. "wrap_attributes": "force-expand-multiline" // 属性强制折行对齐 多行
  138. },
  139. "prettier": {
  140. "eslintIntegration": true, // 让perttier使用eslint的格式进行检查
  141. "arrowParens": "always", // 箭头函数参数括号 默认avoid 可选 avoid | always
  142. "semi": false, // 使用分号, 默认true
  143. "singleQuote": true // 使用单引号, 默认false(在jsx中配置无效, 默认都是双引号)
  144. }
  145. },
  146. // ===========================================
  147. // ============= Material Icon Theme =========
  148. // ===========================================
  149. "workbench.iconTheme": "material-icon-theme", // 主题色
  150. // ===========================================
  151. // ============= stylus Supremacy ============
  152. // ===========================================
  153. "stylusSupremacy.insertColons": false, // 是否插入冒号
  154. "stylusSupremacy.insertSemicolons": false, // 是否插入分号
  155. "stylusSupremacy.insertBraces": false, // 是否插入大括号
  156. //===========================================
  157. //============= koroFileHeaders ===============
  158. //===========================================
  159. "fileheader.configObj": {
  160. "autoAdd": false // 将该选项设置为true即可开启
  161. },
  162. // 函数注释
  163. //===========================================
  164. //============= Code Runner =================
  165. //===========================================
  166. "javascript.updateImportsOnFileMove.enabled": "never",
  167. "liveServer.settings.donotShowInfoMsg": true,
  168. "[javascript]": {
  169. "editor.defaultFormatter": "esbenp.prettier-vscode"
  170. },
  171. "terminal.integrated.rendererType": "dom", //关闭liveserver提示
  172. "telemetry.enableCrashReporter": false,
  173. "telemetry.enableTelemetry": false,
  174. "workbench.settings.enableNaturalLanguageSearch": false,
  175. // 引用路径设置
  176. "path-intellisense.mappings": {
  177. "/@/": "${workspaceRoot}/src"
  178. },
  179. "prettier.requireConfig": true,
  180. "typescript.updateImportsOnFileMove.enabled": "always",
  181. "workbench.sideBar.location": "left",
  182. "cSpell.enabledLanguageIds": [
  183. "asciidoc",
  184. "c",
  185. "cpp",
  186. "csharp",
  187. "css",
  188. "git-commit",
  189. "go",
  190. "handlebars",
  191. "haskell",
  192. "html",
  193. "jade",
  194. "java",
  195. "javascript",
  196. "javascriptreact",
  197. "json",
  198. "jsonc",
  199. "latex",
  200. "less",
  201. "markdown",
  202. "php",
  203. "plaintext",
  204. "pug",
  205. "python",
  206. "restructuredtext",
  207. "rust",
  208. "scala",
  209. "scss",
  210. "text",
  211. "typescript",
  212. "typescriptreact",
  213. "yaml",
  214. "yml"
  215. ],
  216. "[javascriptreact]": {
  217. "editor.defaultFormatter": "esbenp.prettier-vscode"
  218. },
  219. "[typescript]": {
  220. "editor.defaultFormatter": "esbenp.prettier-vscode"
  221. },
  222. "[typescriptreact]": {
  223. "editor.defaultFormatter": "esbenp.prettier-vscode"
  224. },
  225. "[json]": {
  226. "editor.defaultFormatter": "esbenp.prettier-vscode"
  227. },
  228. "[jsonc]": {
  229. "editor.defaultFormatter": "vscode.json-language-features"
  230. },
  231. "[html]": {
  232. "editor.defaultFormatter": "esbenp.prettier-vscode"
  233. },
  234. "[css]": {
  235. "editor.defaultFormatter": "esbenp.prettier-vscode"
  236. },
  237. "[less]": {
  238. "editor.defaultFormatter": "esbenp.prettier-vscode"
  239. },
  240. "[scss]": {
  241. "editor.defaultFormatter": "esbenp.prettier-vscode"
  242. },
  243. "[markdown]": {
  244. "editor.defaultFormatter": "esbenp.prettier-vscode"
  245. },
  246. "cSpell.words": ["yfboilerplate"],
  247. "editor.codeActionsOnSave": {
  248. "source.fixAll.eslint": true
  249. }
  250. }