目前,这是突出显示所有变量的代码,包括类属性(它们是红色):
<dict>
<key>name</key>
<string>Variables</string>
<key>scope</key>
<string>variable, support.variable</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#dc322f</string>
</dict>
</dict>
如何更改类属性的颜色?
$object->property = 'xxx';
所以$object
应该仍然是红色的,但我希望property
采用不同的颜色
答案 0 :(得分:4)
variable.other.property
应该这样做:
<dict>
<key>name</key>
<string>Variables</string>
<key>scope</key>
<string>variable.other.property</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#00ff00</string>
</dict>
</dict>
答案 1 :(得分:1)
变化:
<string>variable, support.variable</string>
要:
<string>variable.other.property</string>