vscode v1.81 的更新(现在在 Insiders 中,大概在 2023 年 8 月上旬发布稳定版):
These colorCustomizations
已添加,以便您可以单独为前 6 个缩进指南着色 - 从代码中的最左侧到右侧计数,请参阅演示):
"workbench.colorCustomizations": {
"editorIndentGuide.activeBackground1": "#ffc400",
"editorIndentGuide.activeBackground2": "#ff0000",
"editorIndentGuide.activeBackground3": "#a51283",
"editorIndentGuide.activeBackground4": "#ff8c00",
"editorIndentGuide.activeBackground5": "#ffc400",
"editorIndentGuide.activeBackground6": "#ffc400",
// non-active indent guide colors
"editorIndentGuide.background1": "#0066ff",
"editorIndentGuide.background2": "#00e5ff",
"editorIndentGuide.background3": "#00e5ff",
"editorIndentGuide.background4": "#00e5ff",
"editorIndentGuide.background5": "#00e5ff",
"editorIndentGuide.background6": "#00e5ff"
}
请注意editorIndentGuide.activeBackground1
and editorIndentGuide.background1
请参阅最左侧的缩进指南等。一次只有一个 activeBackground 被着色 - 无论它恰好位于左侧的哪一层。
VSCode v.1.23(2018 年 5 月发布)添加了为活动和其他非活动缩进指南着色的功能:
"workbench.colorCustomizations": {
"editorIndentGuide.activeBackground": "#ff0000",
"editorIndentGuide.background": "#ff00ff"
}
See 发行说明缩进指南 https://code.visualstudio.com/updates/v1_23#_highlighted-indent-guides
如果您只希望活动参考线可见,请将非活动参考线的背景设置为透明ala:
"workbench.colorCustomizations": {
"editorIndentGuide.background": "#fff0"
}