Vscode开发

插件

image.png
image.png
image.png

设置配置

  1. {
  2. // 配置airplay
  3. "editor.inlineSuggest.enabled": true,
  4. "git.ignoreWindowsGit27Warning": true,
  5. "editor.fontSize": 17,
  6. "extensions.webWorker": true,
  7. "terminal.integrated.tabs.enabled": true,
  8. "terminal.integrated.defaultProfile.windows": "Command Prompt",
  9. "terminal.integrated.profiles.windows": {
  10. "PowerShell": {
  11. "source": "PowerShell",
  12. "icon": "terminal-powershell"
  13. },
  14. "Command Prompt": {
  15. "path": [
  16. "${env:windir}\\Sysnative\\cmd.exe",
  17. "${env:windir}\\System32\\cmd.exe"
  18. ],
  19. "args": [],
  20. "icon": "terminal-cmd"
  21. },
  22. "Git Bash": {
  23. "source": "Git Bash"
  24. },
  25. "Windows PowerShell": {
  26. "path": "C:\\Windows\\System32\\cmd.exe"
  27. }
  28. },
  29. "workbench.iconTheme": "material-icon-theme",
  30. "workbench.colorTheme": "One Dark Pro",
  31. "cssrem.addMark": true,
  32. "liveServer.settings.donotShowInfoMsg": true,
  33. "less.compile": {},
  34. // 样式
  35. "workbench.colorCustomizations": {
  36. "terminal.foreground": "#D8D8D8",
  37. "terminalCursor.background": "#edf065",
  38. "terminalCursor.foreground": "#D8D8D8",
  39. "terminal.ansiBlack": "#181818",
  40. "terminal.ansiBlue": "#7CAFC2",
  41. "terminal.ansiBrightBlack": "#585858",
  42. "terminal.ansiBrightBlue": "#7CAFC2",
  43. "terminal.ansiBrightCyan": "#86C1B9",
  44. "terminal.ansiBrightGreen": "#A1B56C",
  45. "terminal.ansiBrightMagenta": "#BA8BAF",
  46. "terminal.ansiBrightRed": "#AB4642",
  47. "terminal.ansiBrightWhite": "#F8F8F8",
  48. "terminal.ansiBrightYellow": "#F7CA88",
  49. "terminal.ansiCyan": "#86C1B9",
  50. "terminal.ansiGreen": "#A1B56C",
  51. "terminal.ansiMagenta": "#BA8BAF",
  52. "terminal.ansiRed": "#AB4642",
  53. "terminal.ansiWhite": "#D8D8D8",
  54. "terminal.ansiYellow": "#F7CA88"
  55. },
  56. //配置新建文件注释和方法注释
  57. "fileheader.configObj": {
  58. "createFileTime": true, //设置为true则为文件新建时候作为date,否则注释生成时间为date
  59. "autoAdd": true, //自动生成注释,老是忘记的同学可以设置
  60. "annotationStr": {
  61. "head": "/* *",
  62. "middle": "* @",
  63. "end": " */",
  64. "use": true //设置自定义注释可用
  65. },
  66. "headInsertLine": {
  67. "php": 2
  68. }
  69. },
  70. "fileheader.cursorMode": {
  71. "description": "",
  72. "param ": "",
  73. "return": ""
  74. },
  75. "fileheader.customMade": {
  76. "description": "", //文件内容描述
  77. "author": "wanghao", //编辑人
  78. "Date": "Do not edit", //时间
  79. "Modified By": "", //修改人
  80. "version": "1.0.0" //版本
  81. },
  82. // tab 大小为2个空格
  83. "editor.tabSize": 2,
  84. // 100 列后换行
  85. "editor.wordWrapColumn": 100,
  86. // 开启 vscode 文件路径导航
  87. "breadcrumbs.enabled": true,
  88. // 设置 tab 键盘就行补全
  89. "emmet.triggerExpansionOnTab": true,
  90. // "emmet.showAbbreviationSuggestions": true,
  91. "emmet.showExpandedAbbreviation": "always",
  92. "emmet.includeLanguages": {
  93. "javascript": "html",
  94. "wxml": "html"
  95. },
  96. "workbench.editorAssociations": {
  97. "*.ipynb": "jupyter.notebook.ipynb"
  98. },
  99. "cssrem.fixedDigits": 3,
  100. "editor.tokenColorCustomizations": {
  101. "comments": "#0becece8" // 注释
  102. },
  103. // # 每次保存的时候将代码按eslint格式进行修复
  104. // "eslint.autoFixOnSave": true,
  105. "editor.codeActionsOnSave": {
  106. "source.fixAll.eslint": true
  107. },
  108. // vue代码风格配置
  109. "vetur.validation.template": true,
  110. "vetur.format.defaultFormatter.html": "js-beautify-html",
  111. "vetur.format.defaultFormatter.js": "vscode-typescript",
  112. "vetur.format.defaultFormatter.scss": "prettier",
  113. "javascript.format.insertSpaceBeforeFunctionParenthesis": true,
  114. "vetur.format.defaultFormatterOptions": {
  115. "prettier": {
  116. // "semi": false, //不加分号
  117. "singleQuote": true, //用单引号
  118. "trailingComma": "none",
  119. "bracketSpacing": true,
  120. "tabWidth": 2,
  121. "arrowParens": "avoid"
  122. },
  123. "js-beautify-html": {
  124. // "wrap_line_length": 250, //换行长度
  125. "wrap_attributes": "auto" //属性换行 force-aligned
  126. // "end_with_newline": false
  127. }
  128. },
  129. // 根据老师增加的
  130. "files.associations": {
  131. "*.vue": "vue",
  132. "*.cjson": "jsonc",
  133. "*.wxss": "css",
  134. "*.wxs": "javascript"
  135. },
  136. "eslint.codeAction.showDocumentation": {
  137. "enable": false
  138. },
  139. "eslint.workingDirectories": [
  140. ".eslintrc.js",
  141. {
  142. "mode": "auto"
  143. }
  144. ],
  145. "files.insertFinalNewline": true,
  146. "files.trimFinalNewlines": true,
  147. "workbench.editor.showTabs": true,
  148. "[javascript]": {
  149. "editor.defaultFormatter": "rvest.vs-code-prettier-eslint" //格式js
  150. },
  151. "[vue]": {
  152. "editor.defaultFormatter": "rvest.vs-code-prettier-eslint" //格式vue
  153. },
  154. "editor.defaultFormatter": "esbenp.prettier-vscode", //格式ts
  155. "winopacity.opacity": 235,
  156. "eslint.alwaysShowStatus": true,
  157. "security.workspace.trust.untrustedFiles": "open",
  158. "workbench.editor.enablePreview": false,
  159. "editor.minimap.enabled": false,
  160. "minapp-vscode.disableAutoConfig": true,
  161. "files.autoSave": "afterDelay",
  162. "editor.formatOnPaste": true,
  163. "editor.quickSuggestions": {
  164. "strings": true
  165. },
  166. "editor.formatOnSave": true,
  167. "git.suggestSmartCommit": false,
  168. "diffEditor.ignoreTrimWhitespace": false,
  169. // 配置文件--同步vscode配置
  170. "peacock.surpriseMeOnStartup": true,
  171. "sync.gist": "ecda0f6bf591395965064b95c8964968",
  172. "sync.autoUpload": true,
  173. "git.autofetch": true
  174. }

Webstorm配置文件

image.png