Visual studio code VSCode颜色主题方法调用
我正在尝试更改VSCode中的方法调用颜色。我知道我可以如下更改功能范围颜色:Visual studio code VSCode颜色主题方法调用,visual-studio-code,themes,textmate,Visual Studio Code,Themes,Textmate,我正在尝试更改VSCode中的方法调用颜色。我知道我可以如下更改功能范围颜色: { "name": "Function call", "scope": "meta.function-call.object", "settings": { "foreground": "#e26f60" } } 是否存在方法调用的等效项。我只想在下面的代码中突出显示foo_方法(): class Foo(): def foo_method(self): prin
{
"name": "Function call",
"scope": "meta.function-call.object",
"settings": {
"foreground": "#e26f60"
}
}
是否存在方法调用的等效项。我只想在下面的代码中突出显示foo_方法():
class Foo():
def foo_method(self):
print("Called Foo from class")
foo_object = Foo()
foo_object.foo_method()
对
foo_method
的方法调用的范围是:
meta.function-call.generic.python
meta.function-call.python
meta.member.access.python
source.python
因此,为了只针对方法,请尝试在主题中使用更具体的范围选择器。例如,meta.member.access meta.function call
将选择meta.member.access
作用域下的所有meta.function call
作用域:
{
"name": "Function call",
"scope": "meta.member.access meta.function-call",
"settings": {
"foreground": "#e26f60"
}
}
(您可能需要根据具体需要进一步调整范围选择器)谢谢。它正在努力突出该方法。我不太熟悉范围选择器。我可能会稍微调整一下,因为我不想同时突出显示括号内的参数。可能吗?在哪里可以找到有关范围选择器的好信息?谢谢