Visual studio code 三重引号Python docstring的TextMate作用域
我目前正在为Python开发设置VS代码。我希望将三重引用的docstring突出显示为注释,而不是字符串,即在此图片中为灰色而不是浅绿色: 我知道我可以在这个主题的TextMate规则中对此进行调整,但我无法为Python DocString找出正确的范围。我想我会是这样的:Visual studio code 三重引号Python docstring的TextMate作用域,visual-studio-code,syntax-highlighting,textmate,vscode-settings,docstring,Visual Studio Code,Syntax Highlighting,Textmate,Vscode Settings,Docstring,我目前正在为Python开发设置VS代码。我希望将三重引用的docstring突出显示为注释,而不是字符串,即在此图片中为灰色而不是浅绿色: 我知道我可以在这个主题的TextMate规则中对此进行调整,但我无法为Python DocString找出正确的范围。我想我会是这样的: "editor.tokenColorCustomizations": { "[Predawn]": { "comments": "#777777", "textMateRules"
"editor.tokenColorCustomizations": {
"[Predawn]": {
"comments": "#777777",
"textMateRules": [
{
"scope": "string.quoted.triple",
"settings": {
"foreground": "#777777"
}
}
]
},
}
但是,即使在重新启动编辑器之后,这也没有达到预期效果。有人知道什么是正确的范围吗?只需扩展上面的注释,范围是: 对于docstrings:string.quoted.docstring.multi.python For'or.single For' 对于非docstring的三引号字符串:string.quote.multi.python
不使用范围字符串.quote.triple,即使它出现在settings.json autocomplete中。来自命令面板开发人员:Inspect TMScopes@Alex我应该如何理解这个?string.quoted.docstring.multi?谢谢,这确实显示了当前突出显示的代码的范围。