vscode json设置大全
时间: 2023-08-21 16:03:29 浏览: 174
vscode json tools
以下是 Visual Studio Code 中 JSON 文件的常见设置:
1. 编辑器格式化
```
"editor.formatOnSave": true,
"editor.formatOnType": true,
```
2. 文件保存时自动格式化
```
"editor.formatOnSave": true,
```
3. 换行符设置
```
"files.eol": "\n",
```
4. 文件编码设置
```
"files.encoding": "utf8",
```
5. 文件自动保存
```
"files.autoSave": "afterDelay",
"files.autoSaveDelay": 1000,
```
6. 文件搜索时排除指定文件或文件夹
```
"files.exclude": {
"node_modules": true,
"**/.git": true
},
```
7. 自动补全
```
"editor.suggestOnTriggerCharacters": true,
"editor.acceptSuggestionOnEnter": "on",
"editor.wordBasedSuggestions": true,
```
8. 自动更新
```
"update.channel": "default",
"update.enableWindowsBackgroundUpdates": true,
```
9. Git 集成
```
"git.enableSmartCommit": true,
"git.autofetch": true,
"git.confirmSync": false,
"git.enableCommitSigning": true,
```
10. 代码片段
```
"emmet.triggerExpansionOnTab": true,
"emmet.includeLanguages": {
"javascript": "javascriptreact",
"vue-html": "html",
"razor": "html",
"plaintext": "jade"
},
```
11. 主题设置
```
"workbench.colorTheme": "Default Dark+",
"workbench.iconTheme": "vscode-icons",
"workbench.editor.enablePreviewFromQuickOpen": false,
```
12. 字体设置
```
"editor.fontFamily": "'Fira Code', 'Droid Sans Mono', 'monospace', 'Droid Sans Fallback'",
"editor.fontLigatures": true,
"editor.fontSize": 14,
"editor.lineHeight": 24,
```
以上是常见的 Visual Studio Code 中 JSON 文件的设置。如果您需要更多帮助或其他设置,请查看官方文档。
阅读全文