-
Notifications
You must be signed in to change notification settings - Fork 3
/
settings.json
375 lines (375 loc) · 13.5 KB
/
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
{
// VScode主题配置
"workbench.iconTheme": "file-icons",
"workbench.colorTheme": "Dracula Soft",
"workbench.editor.limit.enabled": true,
"workbench.editor.limit.perEditorGroup": true,
"workbench.editor.limit.value": 5, // 打开的编辑器的最大数量(默认为10,超出数量会自动关闭)
"workbench.activityBar.visible": true,
"workbench.editor.tabCloseButton": "left",
"workbench.list.smoothScrolling": true,
"workbench.productIconTheme": "Default",
"workbench.sideBar.location": "left",
"workbench.tree.expandMode": "singleClick",
"workbench.tree.indent": 10,
"workbench.startupEditor": "none",
"workbench.editor.closeOnFileDelete": true,
"workbench.editor.highlightModifiedTabs": true,
// Editor
"editor.accessibilitySupport": "off",
"editor.cursorSmoothCaretAnimation": "on",
"editor.find.addExtraSpaceOnTop": false,
"editor.guides.bracketPairs": "active",
"editor.inlineSuggest.enabled": true,
"editor.lineNumbers": "interval",
"editor.tabSize": 2,
"editor.lineHeight": 24,
"editor.renderLineHighlight": "none",
"editor.renderWhitespace": "none",
"editor.fontFamily": "Consolas",
"editor.fontSize": 15,
"editor.cursorBlinking": "smooth",
"editor.multiCursorModifier": "ctrlCmd",
"editor.wordWrap": "off", // 永不换行
"editor.wordWrapColumn": 400,
"editor.linkedEditing": true,
"editor.bracketPairColorization.enabled": true,
"editor.unicodeHighlight.invisibleCharacters": false,
"editor.stickyScroll.enabled": true,
"editor.hover.sticky": true,
// 自定义代码片段显示位置。top:自定义片段会优先显示在最上方
"editor.snippetSuggestions": "top",
// 代码提示默认选中项。
// coding时,VScode会给出很多提示,在所有的提示选项中会默认选中一个,这一配置就是表示默认选中哪一项。
// 此项配置十分精妙,自己改改探索一下。
// 可选值如下:
// "editor.snippetSuggestions": "first" VScode将总是选中第一项
// "editor.snippetSuggestions": "recentlyUsed" (默认值)vscode将从代码提示中,预先选中最近使用过的项
// "editor.snippetSuggestions": "recentlyUsedByPrefix" (推介)vscode将从所有可用片段中,预先选中最近使用过的项
"editor.suggestSelection": "recentlyUsedByPrefix",
"editor.quickSuggestions": {
// 是否显示可能用到的示例代码.安装插件过多,建议选项也会非常多
"other": true,
"comments": true,
"strings": false
},
// 粘贴后的内容, 是否对此粘贴内容进行格式化
"editor.formatOnPaste": true,
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
// 自动对 import 这种符合CommonJS规范语句进行排序,
// 要使此功能生效,要求使用到星号的语句写在当前文件顶部,例如:import * as Some from "R"
"source.organizeImport": true,
// 自动引入缺少的库
"source.addMissingImports": false,
"source.organizeImports": false,
"source.fixAll": true // 对所有文件,保存时自动格式化
// "source.fixAll.eslint": false, // 更细. 在文件保存时,eslint规则生效。此配置会影响 eslint.format.enable
// "source.fixAll.tslint": false, // 更细. 在文件保存时,tslint规则生效。 此配置会影响 typescript.validate.enable
// "source.fixAll.stylelint": false // 更细. 在文件保存时,stylelint样式规则生效
},
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false,
"window.autoDetectColorScheme": true,
"extensions.autoUpdate": "onlyEnabledExtensions",
"extensions.ignoreRecommendations": true,
// 文件默认行尾字符
"files.eol": "\n",
"files.insertFinalNewline": true,
"files.simpleDialog.enable": true,
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"terminal.integrated.defaultProfile.windows": "Command Prompt",
"terminal.integrated.cursorBlinking": true,
"terminal.integrated.cursorStyle": "line",
"terminal.integrated.fontWeight": "300",
"terminal.integrated.persistentSessionReviveProcess": "never",
"terminal.integrated.tabs.enabled": true,
// 配置 vscode 默认打开外部终端为 Cmder. 注意本机如果没安装第三方终端,那么无需配置此项
"terminal.external.windowsExec": "C:\\Windows\\System32\\cmd.exe",
// 配置 vscode 内部集成 Cmder 终端
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": [
"/k D:\\Asoftware\\cmder\\vendor\\init.bat"
],
"icon": "terminal-cmd"
},
"Git Bash": {
"source": "Git Bash"
}
},
"scm.diffDecorationsGutterWidth": 2,
"debug.onTaskErrors": "debugAnyway",
"diffEditor.ignoreTrimWhitespace": false,
// 移动文件或者修改文件名时,是否自动更新引用了此文件的所有文件
"javascript.updateImportsOnFileMove.enabled": "always",
"javascript.validate.enable": false,
"breadcrumbs.enabled": true,
// 配置打开html文件的默认浏览器
"open-in-browser.default": "chrome",
// VScode进行文件搜索时,不搜索这些区域。
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/*.code-search": true,
"**/.DS_Store": true,
"**/.git": true,
"**/.gitignore": true,
"**/.idea": true,
"**/.svn": true,
"**/.vscode": true,
"**/build": true,
"**/dist": true,
"**/tmp": true,
"**/yarn.lock": true,
"**/assets": true,
"**/.history": true,
"vite.config.ts.timestamp-*": true,
"**/pnpm-lock.yaml": true
},
// 配置是否在左侧目录列表中显示该文件/文件夹
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/*.g.dart": true
},
// 配置文件关联
// 比如小程序中的 .wxss 这种文件,会把它作为css文件来处理,以便相关插件提供对应的css的语法提示,css的格式化等。
"files.associations": {
"*.wxss": "css",
"*.cjson": "jsonc",
"*.wxs": "javascript",
"*.ts": "typescript",
"*.vue": "vue",
"*.dart": "dart",
"*.json": "jsonc",
".prettierrc": "jsonc"
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[handlebars]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"[typescript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[less]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[vue]": {
"editor.defaultFormatter": "Vue.volar"
},
// 配置emmet是否启用tab展开缩写
// vscode已经内置emmet,这一设置最大作用是:当输入的文本不属于Emmet定义的缩写规则时,依然允许使用Tab键进行扩展。此时会提示自定义的缩写语句,以及各插件自定义的缩写语句.
"emmet.triggerExpansionOnTab": true,
"emmet.showSuggestionsAsSnippets": true,
"emmet.includeLanguages": {
"wxml": "html",
"vue-html": "html",
"javascript": "javascriptreact",
"jsx-sublime-babel-tags": "javascriptreact"
},
"errorLens.enabledDiagnosticLevels": [
"warning",
"error"
],
"errorLens.excludeBySource": [
"Grammarly",
"eslint"
],
"eslint.validate": [
"javascript",
"javascriptreact",
"html",
"typescript",
"typescriptreact",
"vue",
"markdown",
"json",
"jsonc",
"json5"
],
"css.lint.hexColorLength": "ignore",
// 在push代码时,是否先自动从远端拉取代码
"git.autofetch": true,
"git.enableSmartCommit": true,
"git.confirmSync": false,
"git.untrackedChanges": "separate",
"git.ignoreRebaseWarning": true,
"gitlens.advanced.messages": {
"suppressCommitHasNoPreviousCommitWarning": false,
"suppressCommitNotFoundWarning": false,
"suppressFileNotUnderSourceControlWarning": false,
"suppressGitVersionWarning": false,
"suppressLineUncommittedWarning": false,
"suppressNoRepositoryWarning": false
},
"gitlens.codeLens.authors.enabled": false,
"gitlens.codeLens.enabled": false,
"gitlens.codeLens.recentChange.enabled": false,
"gitlens.menus": {
"editor": {
"blame": false,
"clipboard": true,
"compare": true,
"history": false,
"remote": false
},
"editorGroup": {
"blame": true,
"compare": false
},
"editorTab": {
"clipboard": true,
"compare": true,
"history": true,
"remote": true
},
"explorer": {
"clipboard": true,
"compare": true,
"history": true,
"remote": true
},
"scm": {
"authors": true
},
"scmGroup": {
"compare": true,
"openClose": true,
"stash": true
},
"scmGroupInline": {
"stash": true
},
"scmItem": {
"clipboard": true,
"compare": true,
"history": true,
"remote": false,
"stash": true
}
},
// css2rem插件: 书写css时,px单位自动提示是否转换为rem单位
// 此处根字体大小设置为100(默认为16), 注意与你项目中rem数值保持一致
"cssrem.rootFontSize": 100,
"svg.preview.mode": "svg",
"liveServer.settings.donotShowInfoMsg": true,
"security.workspace.trust.untrustedFiles": "open",
"debug.openDebug": "openOnDebugBreak", // 断点调试时,遇到断点,自动显示调试视图。(全局,不可为每种语言单独配置)
/// **python开发专用配置**
"python.linting.enabled": false, // 是否格式化python文件
"minapp-vscode.disableAutoConfig": true, // 微信小程序是否自动配置
/// **apicloud开发专用配置** 。
"apicloud.port": "23450", // 设置apicloud在vscode中的wifi真机同步时的端口
"apicloud.subdirectories": "/apicloudproject", // 设置apicloud在vscode中的wifi真机同步根目录,默认可不设置
/// **dart语言专用配置**
"dart.checkForSdkUpdates": false,
"dart.warnWhenEditingFilesOutsideWorkspace": true,
"dart.openDevTools": "flutter",
"dart.enableCompletionCommitCharacters": true,
"dart.lineLength": 120,
"dart.previewFlutterUiGuides": true,
"dart.debugSdkLibraries": true,
"dart.debugExternalPackageLibraries": true,
"[dart]": {
// 保存文件时,是否自动格式化代码,
"editor.formatOnSave": true,
// 当你输入特定字符时,是否自动格式化代码,(比如输入 `;` 和 `}`).
"editor.formatOnType": true,
// 在120个字符处画一条引导线,这个范围内的dart代码将被格式化。
"editor.rulers": [
120
],
// 禁用与所选内容匹配的单词的内置突出显示。如果不这样做,所选文本的所有实例都将突出显示,从而影响Dart突出显示所选变量的精确引用的能力。
"editor.selectionHighlight": false,
// 默认情况下,当处于“代码片段模式”(在插入的代码中编辑占位符)时,VS会防止snippets弹出打开。
// 如果设置为“false”,则表示允许完成操作打开,就像不在代码段占位符中
"editor.suggest.snippetsPreventQuickSuggestions": true,
"editor.suggestSelection": "recentlyUsedByPrefix",
// 允许使用按<tab>速写代码片段,例如,输入“for”时,即使完成列表不可见。
"editor.tabCompletion": "onlySnippets",
// 默认情况下,当前的语言没有代码片段提示时,VS Code将使用当前文件中的你自己写过的单词来显示代码片段提示。
// 这导致代码完成在编辑注释和字符串时建议单词。 此设置将阻止这种情况
// 对于dart来说最好关闭,对于html和css建议开启
"editor.wordBasedSuggestions": false,
// 在文件底部添加新代码行时,强制所有文件都有一行空格。
"files.insertFinalNewline": true
},
/// **java语言专用配置**
"java.jdt.ls.java.home": "C:/Program Files/Java/jdk-17.0.3.1",
"java.configuration.runtimes": [
{
"name": "JavaSE-1.8",
"path": "D:/allsofoware/java8"
},
{
"name": "JavaSE-11",
"path": "D:/allsofoware/java11",
"default": true
},
{
"name": "JavaSE-17",
"path": "D:/allsofoware/java17",
"default": true
}
],
"[python]": {
"editor.formatOnType": true
},
"vscode-edge-devtools.webhint": false,
"settingsSync.ignoredExtensions": [],
"javascript.preferences.autoImportFileExcludePatterns": [
"@vue/runtime-core",
"@vue/runtime-dom"
],
"typescript.preferences.autoImportFileExcludePatterns": [
"@vue/runtime-core",
"@vue/runtime-dom"
],
// 解决Vue2换行问题
"vetur.ignoreProjectWarning": true,
"vetur.format.defaultFormatter.html": "js-beautify-html",
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"wrap_attributes": "auto"
},
"prettyhtml": {
"printWidth": 100,
"singleQuote": false,
"wrapAttributes": false,
"sortAttributes": false
},
},
}