visual-studio-code - VS Code - 无法写入用户设置
问题描述
每当我尝试应用任何新主题或更改字体时,我总是会收到上述错误。然后它打开我在下面粘贴的 settings.json
"editor.accessibilitySupport": "on",
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"python.languageServer": "Microsoft",
"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\cmd.exe",
"python.defaultInterpreterPath": "C:\\Python39\\python.exe",
"workbench.iconTheme": "material-icon-theme",
"java.semanticHighlighting.enabled": true,
"window.zoomLevel": 0,
"editor.multiCursorModifier": "ctrlCmd",
"workbench.colorTheme": "Vue Theme",
"tabnine.experimentalAutoImports": true,
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "text.html.markdown.journal.task.open.bullet",
"settings": {
"foreground": "#FFFF00"
}
},
{
"scope": "text.html.markdown.journal.task.open.marker",
"settings": {
"foreground": "#FFFF00"
}
},
{
"scope": "text.html.markdown.journal.task.open.keyword",
"settings": {
"fontStyle": "italic"
}
},
{
"scope": "text.html.markdown.journal.task.open.text",
"settings": {}
},
{
"scope": "text.html.markdown.journal.task.completed.keyword",
"settings": {
"fontStyle": "italic"
}
},
{
"scope": "text.html.markdown.journal.task.completed.marker",
"settings": {
"foreground": "#AAAAAA"
}
},
{
"scope": "text.html.markdown.journal.task.completed.text",
"settings": {
"foreground": "#AAAAAA"
}
},
{
"scope": "text.html.markdown.journal.task.completed.bullet",
"settings": {
"foreground": "#FFFF00"
}
},
{
"scope": "text.html.markdown.journal.memo.keyword",
"settings": {
"fontStyle": "italic"
}
},
{
"scope": "text.html.markdown.journal.memo.bullet",
"settings": {
"foreground": "#FFFF00"
}
},
{
"scope": "text.html.markdown.journal.scope",
"settings": {
"foreground": "#FFFF00"
}
},
{
"scope": "text.html.markdown.journal.link.keyword",
"settings": {
"fontStyle": "italic"
}
},
{
"scope": "text.html.markdown.journal.link.bullet",
"settings": {
"foreground": "#FFFF00"
}
}
]
},
"C_Cpp.updateChannel": "Insiders",
"editor.fontLigatures": true,
"editor.autoClosingBrackets": "always",
"editor.tabSize": 4,
"editor.fontFamily": "Cascadia Code",
"editor.cursorBlinking": "expand",
"window.title": "${dirty}${activeEditorShort}${separator}${rootName}${appName}",
"files.autoSave": "afterDelay",
"code-runner.runInTerminal": true,
"git.ignoreMissingGitWarning": true,
"terminal.integrated.rendererType": "dom",
"python.showStartPage": false,
"todo-tree.tree.showScanModeButton": false,
"dateTime.locale": ""
"dateTime.use24HourClock": false
"dateTime.showAMPM": true
"dateTime.showDayOfWeek": true
"dateTime.showMonth": true
"dateTime.showDayOfMonth": true
}
由于我在 JSON 方面没有太多经验,我无法理解错误在哪里。请尽快帮助我。提前致谢!
解决方案
您粘贴的 json 文件一开始需要一个左大括号。
您还缺少很多逗号。
{
"editor.accessibilitySupport": "on",
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"python.languageServer": "Microsoft",
"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\cmd.exe",
"python.defaultInterpreterPath": "C:\\Python39\\python.exe",
"workbench.iconTheme": "material-icon-theme",
"java.semanticHighlighting.enabled": true,
"window.zoomLevel": 0,
"editor.multiCursorModifier": "ctrlCmd",
"workbench.colorTheme": "Vue Theme",
"tabnine.experimentalAutoImports": true,
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "text.html.markdown.journal.task.open.bullet",
"settings": {
"foreground": "#FFFF00"
}
},
{
"scope": "text.html.markdown.journal.task.open.marker",
"settings": {
"foreground": "#FFFF00"
}
},
{
"scope": "text.html.markdown.journal.task.open.keyword",
"settings": {
"fontStyle": "italic"
}
},
{
"scope": "text.html.markdown.journal.task.open.text",
"settings": {}
},
{
"scope": "text.html.markdown.journal.task.completed.keyword",
"settings": {
"fontStyle": "italic"
}
},
{
"scope": "text.html.markdown.journal.task.completed.marker",
"settings": {
"foreground": "#AAAAAA"
}
},
{
"scope": "text.html.markdown.journal.task.completed.text",
"settings": {
"foreground": "#AAAAAA"
}
},
{
"scope": "text.html.markdown.journal.task.completed.bullet",
"settings": {
"foreground": "#FFFF00"
}
},
{
"scope": "text.html.markdown.journal.memo.keyword",
"settings": {
"fontStyle": "italic"
}
},
{
"scope": "text.html.markdown.journal.memo.bullet",
"settings": {
"foreground": "#FFFF00"
}
},
{
"scope": "text.html.markdown.journal.scope",
"settings": {
"foreground": "#FFFF00"
}
},
{
"scope": "text.html.markdown.journal.link.keyword",
"settings": {
"fontStyle": "italic"
}
},
{
"scope": "text.html.markdown.journal.link.bullet",
"settings": {
"foreground": "#FFFF00"
}
}
]
},
"C_Cpp.updateChannel": "Insiders",
"editor.fontLigatures": true,
"editor.autoClosingBrackets": "always",
"editor.tabSize": 4,
"editor.fontFamily": "Cascadia Code",
"editor.cursorBlinking": "expand",
"window.title": "${dirty}${activeEditorShort}${separator}${rootName}${appName}",
"files.autoSave": "afterDelay",
"code-runner.runInTerminal": true,
"git.ignoreMissingGitWarning": true,
"terminal.integrated.rendererType": "dom",
"python.showStartPage": false,
"todo-tree.tree.showScanModeButton": false,
"dateTime.locale": "",
"dateTime.use24HourClock": false,
"dateTime.showAMPM": true,
"dateTime.showDayOfWeek": true,
"dateTime.showMonth": true,
"dateTime.showDayOfMonth": true
}
推荐阅读
- java - Mockito.verify 不适用于 Lombok @Delegate
- linux - PHP 是使用我的操作系统的“语言环境”还是它自己内置的 ICU 语言环境数据?
- r - 在 R 中改变数据框以添加带有 if 条件的列时出错
- android - 在退出线程之前将最后一个任务安全地发布到 Handler
- php - PHP 7.4 and Ubuntu 18 - PHP Startup: Unable to load dynamic library 'curl.so'
- python - TensorFlow MirroredStrategy() 不适用于多 GPU 训练
- git - git中的hg clone --noupdate等价物是什么?
- r - 无法从 ANOVA 表中打印特定值
- sql - SQL 查询:计数,按月-年分组,具有多个日期字段
- python - PRINT ALL JSON ATTRIBUTES VALUES IN PYTHON