如何在VSCode的默认主题中为Python自定义文档字符串颜色? [英] How to customize docstring color for Python in VSCode's default theme?
本文介绍了如何在VSCode的默认主题中为Python自定义文档字符串颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人可以告诉我如何在VSCode的默认主题中为Python自定义文档字符串颜色吗?我想通过用户设置完成此操作,因为希望能够保存我的配置文件。
Could some one explain to me please how to customize docstring color for Python in VSCode's default theme? I want to do it thru User Settings because want to be able to save my config file.
我尝试使用 editor.tokenColorCustomizations:{},但它会影响所有
I tried to use "editor.tokenColorCustomizations": {} but it affects all strings.
推荐答案
将其添加到设置文件中:
Add this to your setting file:
<!-- language: json -->
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope":"string.quoted.docstring.multi.python",
"settings": {
"foreground": "#69676c" //change to your preference
}
}
]
}
附加信息:
用于查找其他元素的范围,请使用命令 Developer:Inspect TM范围
,如此处 https://github.com/Microsoft/ vscode / pull / 29393
更多详细信息:
https://code.visualstudio.com/docs/getstarted/themes#_customize-a-color-theme
这篇关于如何在VSCode的默认主题中为Python自定义文档字符串颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文