VS Code编辑器没有显示正确的主题。有时它可以工作,有时候不行,我无法弄清楚如何复制它。我卸载了VS Code并重新安装了它,但仍然无法调试我的自定义主题。
我已经创建了一个新的颜色主题
$ yo code
我选择了 新的颜色主题
,并选择了 黑色空白主题
。
现在当我启动调试器时,它会加载一个具有我的主题的新编辑器。我可以在 首选项
和 颜色主题
菜单中进行选择。
然后有时它无法应用所选更改。
但是当我从 tokenColors: [...]
中删除所有内容后,它会让我重新选择颜色主题,但是当我在 tokenColors 中键入一些新主题并重新加载时,它不会应用新样式。
我猜想 VS Code 在某个地方缓存了样式,并且不会覆盖它。
问题是如果我无法调试它,我怎么开发新的颜色主题呢?
如何重新加载主题?
{
"name": "T",
"type": "dark",
"colors": {
"editorGroup.background": "#2b303b",
"editorGroup.border": "#c0c5ce",
"editor.background": "#2b303b",
"editor.foreground": "#c0c5ce",
"activityBarBadge.background": "#2b303b",
"sideBar.background": "#1c1f26",
"sideBar.foreground": "#c0c5ce",
"list.hoverBackground": "#2b303b",
"list.hoverForeground": "#c0c5ce",
"list.activeSelectionForeground": "#c0c5ce",
"list.inactiveSelectionForeground": "#c0c5ce",
"list.activeSelectionBackground": "#2b303b",
"list.inactiveSelectionBackground": "#2b303b",
"sideBarTitle.foreground": "#c0c5ce",
"sideBarSectionHeader.background": "#2b303b",
"statusBar.background": "#1c1f26",
"statusBar.foreground": "#c0c5ce",
"tab.activeBackground": "#2b303b",
"tab.inactiveBackground": "#1c1f26",
"terminal.background": "#2b303b",
"activityBar.border": "#1c1f26",
"activityBar.background": "#2b303b",
"sideBar.border": "#1c1f26",
"tab.activeForeground": "#c0c5ce"
},
"tokenColors": [
{
// const, let, if, else, async, await, try, catch
"name": "j",
"scope": [
"storage.type.js.jsx",
"storage.modifier.async.js.jsx",
"keyword.control.flow.js.jsx",
"keyword.control.conditional.js.jsx",
"keyword.control.trycatch.js.jsx"
],
"settings": {
"foreground": "#b48ead",
"fontStyle": "italic"
}
}
]
}