Vue 組件安裝完成后的配置,具體內容如下所示:
VSCode插件安裝完成后,有些插件如果你想要完整的使用其中的功能得在settings.json中就行配置,接下來是我常用的一些配置
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
{ "workbench.iconTheme" : "vscode-icons" , "window.zoomLevel" : 0, "files.autoSave" : "afterDelay" , "eslint.runtime" : "" , "editor.codeActionsOnSave" : { "source.fixAll.eslint" : true }, "eslint.codeAction.disableRuleComment" : {}, "eslint.codeAction.showDocumentation" : {}, "editor.formatOnSave" : true , "vetur.completion.scaffoldSnippetSources" : {}, "vetur.format.defaultFormatter.html" : "prettier" , // 是否允許自定義的snippet片段提示 "editor.snippetSuggestions" : "top" , "editor.fontSize" : 14, "editor.fontWeight" : "400" , "editor.formatOnType" : true , "guides.enabled" : false , "editor.tabSize" : 2, "git.confirmSync" : false , "editor.renderWhitespace" : "boundary" , "editor.cursorBlinking" : "smooth" , "editor.minimap.enabled" : true , "editor.minimap.renderCharacters" : false , "window.title" : "${dirty}${activeEditorMedium}${separator}${rootName}" , "editor.codeLens" : true , // 配置文件關聯,以便啟用對應的提示 "files.associations" : { "*.vue" : "vue" , "*.wxss" : "css" , "*.cjson" : "jsonc" , "*.wxs" : "javascript" }, // 配置emmet是否啟用tab展開縮寫 "emmet.triggerExpansionOnTab" : true , // 配置emmet對文件類型的支持 "emmet.syntaxProfiles" : { "javascript" : "jsx" , "vue" : "html" , "vue-html" : "html" }, // 是否開啟eslint檢測 "eslint.enable" : true , // eslint配置文件 "eslint.options" : { "extensions" : [ ".js" , ".vue" ] }, "git.autofetch" : true , "workbench.colorTheme" : "One Dark Pro" , "emmet.includeLanguages" : { "wxml" : "html" }, "minapp-vscode.disableAutoConfig" : true , } |
這個配置能夠直接讓你ctrl+/注釋代碼,不管是vue的還是html的;也能ctrl+s時使用eslint格式化代碼;輸入for,forEach,map等的自動完成代碼等一系列的快捷操作
總結
到此這篇關于VSCode插件安裝完成后的配置(常用配置)的文章就介紹到這了,更多相關VSCode插件安裝內容請搜索服務器之家以前的文章或繼續瀏覽下面的相關文章希望大家以后多多支持服務器之家!
原文鏈接:https://blog.csdn.net/z772330927/article/details/108192816