有人可以向我解释一下如何在VSCode的默认主题中自定义Python的docstring颜色吗?我想通过用户设置来做,因为我希望能够保存我的配置文件。
我尝试使用“editor.tokenColorCustomizations”:{}但它会影响所有字符串。
将其添加到您的设置文件中:
<!-- language: json -->
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope":"string.quoted.docstring.multi.python",
"settings": {
"foreground": "#69676c" //change to your preference
}
}
]
}
附加信息:要查找其他元素的范围,请使用命令Developer: Inspect TM Scopes
,如此处所述https://github.com/Microsoft/vscode/pull/29393
更多细节:https://code.visualstudio.com/docs/getstarted/themes#_customize-a-color-theme