settings.json 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  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": [
  122. "html",
  123. "vue",
  124. "javascript",
  125. "jsx",
  126. "typescript"
  127. ]
  128. },
  129. "eslint.autoFixOnSave": true, // 保存自动格式化
  130. // ===========================================
  131. // ================ Vetur ====================
  132. // ===========================================
  133. "vetur.experimental.templateInterpolationService": true,
  134. "vetur.format.options.tabSize": 2,
  135. "vetur.format.defaultFormatter.html": "js-beautify-html", // 使用js-beautify-html格式化
  136. "vetur.format.defaultFormatter.scss": "prettier", // 使用js-beautify-html格式化
  137. "vetur.format.defaultFormatter.css": "prettier", // 使用js-beautify-html格式化
  138. // "vetur.format.defaultFormatter.html": "prettyhtml",
  139. "vetur.format.defaultFormatter.js": "prettier",
  140. // "vetur.useWorkspaceDependencies": true,
  141. "vetur.format.defaultFormatterOptions": {
  142. "js-beautify-html": {
  143. // "wrap_attributes": "force-aligned", // 单行
  144. "wrap_attributes": "force-expand-multiline" // 属性强制折行对齐 多行
  145. },
  146. "prettier": {
  147. "eslintIntegration": true, // 让perttier使用eslint的格式进行检查
  148. "arrowParens": "always", // 箭头函数参数括号 默认avoid 可选 avoid | always
  149. "semi": false, // 使用分号, 默认true
  150. "singleQuote": true // 使用单引号, 默认false(在jsx中配置无效, 默认都是双引号)
  151. }
  152. },
  153. // ===========================================
  154. // ============= Material Icon Theme =========
  155. // ===========================================
  156. "workbench.iconTheme": "material-icon-theme", // 主题色
  157. // ===========================================
  158. // ============= stylus Supremacy ============
  159. // ===========================================
  160. "stylusSupremacy.insertColons": false, // 是否插入冒号
  161. "stylusSupremacy.insertSemicolons": false, // 是否插入分号
  162. "stylusSupremacy.insertBraces": false, // 是否插入大括号
  163. //===========================================
  164. //============= koroFileHeaders ===============
  165. //===========================================
  166. "fileheader.configObj": {
  167. "autoAdd": false // 将该选项设置为true即可开启
  168. },
  169. // 函数注释
  170. //===========================================
  171. //============= Code Runner =================
  172. //===========================================
  173. "javascript.updateImportsOnFileMove.enabled": "never",
  174. "liveServer.settings.donotShowInfoMsg": true,
  175. "[javascript]": {
  176. "editor.defaultFormatter": "esbenp.prettier-vscode"
  177. },
  178. "terminal.integrated.rendererType": "dom", //关闭liveserver提示
  179. "telemetry.enableCrashReporter": false,
  180. "telemetry.enableTelemetry": false,
  181. "workbench.settings.enableNaturalLanguageSearch": false,
  182. // 引用路径设置
  183. "path-intellisense.mappings": {
  184. "/@/": "${workspaceRoot}/src"
  185. },
  186. "prettier.requireConfig": true,
  187. "typescript.updateImportsOnFileMove.enabled": "always",
  188. "workbench.sideBar.location": "left",
  189. "cSpell.enabledLanguageIds": [
  190. "asciidoc",
  191. "c",
  192. "cpp",
  193. "csharp",
  194. "css",
  195. "git-commit",
  196. "go",
  197. "handlebars",
  198. "haskell",
  199. "html",
  200. "jade",
  201. "java",
  202. "javascript",
  203. "javascriptreact",
  204. "json",
  205. "jsonc",
  206. "latex",
  207. "less",
  208. "markdown",
  209. "php",
  210. "plaintext",
  211. "pug",
  212. "python",
  213. "restructuredtext",
  214. "rust",
  215. "scala",
  216. "scss",
  217. "text",
  218. "typescript",
  219. "typescriptreact",
  220. "yaml",
  221. "yml"
  222. ],
  223. "[javascriptreact]": {
  224. "editor.defaultFormatter": "esbenp.prettier-vscode"
  225. },
  226. "[typescript]": {
  227. "editor.defaultFormatter": "esbenp.prettier-vscode"
  228. },
  229. "[typescriptreact]": {
  230. "editor.defaultFormatter": "esbenp.prettier-vscode"
  231. },
  232. "[json]": {
  233. "editor.defaultFormatter": "esbenp.prettier-vscode"
  234. },
  235. "[jsonc]": {
  236. "editor.defaultFormatter": "vscode.json-language-features"
  237. },
  238. "[html]": {
  239. "editor.defaultFormatter": "esbenp.prettier-vscode"
  240. },
  241. "[css]": {
  242. "editor.defaultFormatter": "esbenp.prettier-vscode"
  243. },
  244. "[less]": {
  245. "editor.defaultFormatter": "esbenp.prettier-vscode"
  246. },
  247. "[scss]": {
  248. "editor.defaultFormatter": "esbenp.prettier-vscode"
  249. },
  250. "[markdown]": {
  251. "editor.defaultFormatter": "esbenp.prettier-vscode"
  252. },
  253. "cSpell.words": [
  254. "yfboilerplate"
  255. ],
  256. "editor.codeActionsOnSave": {
  257. "source.fixAll.eslint": true
  258. }
  259. }