需要安装 Vetur

  1. {
  2. "typescript.locale": "zh-CN",
  3. "vetur.format.options.tabSize": 4,
  4. "vetur.format.defaultFormatterOptions": {
  5. "js-beautify-html": {
  6. "wap_line_length": 5000,
  7. "end_with_newline": false,
  8. "tabWidth": 4,
  9. "printWidth": 200,
  10. "wrap_attributes": "auto",
  11. // - auto: 仅在超出行长度时才对属性进行换行。
  12. // - force: 对除第一个属性外的其他每个属性进行换行。
  13. // - force-aligned: 对除第一个属性外的其他每个属性进行换行,并保持对齐。
  14. // - force-expand-multiline: 对每个属性进行换行。
  15. // - aligned-multiple: 当超出折行长度时,将属性进行垂直对齐。
  16. },
  17. "prettyhtml": {
  18. "printWidth": 5000,
  19. "singleQuote": false,
  20. "wrapAttributes": false,
  21. "sortAttributes": false,
  22. "tabWidth": 4,
  23. },
  24. },
  25. "vetur.format.defaultFormatter.html": "js-beautify-html",
  26. "[javascript]": {
  27. "editor.defaultFormatter": "vscode.typescript-language-features",
  28. "editor.maxTokenizationLineLength": 10000000000,
  29. "editor.tabSize": 4,
  30. "editor.detectIndentation": false,
  31. },
  32. "workbench.sideBar.location": "left",
  33. "git.confirmSync": false,
  34. // 头部注释
  35. "fileheader.configObj": {
  36. "createHeader": true,
  37. },
  38. "fileheader.customMade": {
  39. // 头部注释默认字段
  40. "Author": "chengMingRui",
  41. "Date": "Do not edit", // 设置后默认设置文件生成时间
  42. "LastEditTime": "Do not edit", // 设置后,保存文件更改默认更新最后编辑时间
  43. "Description": "",
  44. "FilePath": "Do not edit", // 设置后,默认生成文件相对于项目的路径
  45. },
  46. "diffEditor.ignoreTrimWhitespace": true,
  47. "editor.codeActionsOnSave": {
  48. "source.fixAll": false
  49. },
  50. "git.enableSmartCommit": true,
  51. "editor.wordWrap": "wordWrapColumn",
  52. "editor.tabSize": 4,
  53. "editor.wordWrapColumn": 500,
  54. "editor.detectIndentation": false,
  55. "editor.suggest.showIssues": false,
  56. "css.lint.important": "warning", // 避免使用 important 因为权重太高
  57. "css.lint.ieHack": "ignore",
  58. "css.lint.compatibleVendorPrefixes": "warning",
  59. "[vue]": {
  60. "editor.defaultFormatter": "octref.vetur"
  61. },
  62. }