Local variables are black, member variables are dark blue, and member functions are dark gold. Even in a chain of calling, member variables and member functions are highlighted appropriately.
However, when I use the OneHalf Light with the same setting as above, I get the following:
The member variable in the class itself is uncolored, member and local variables are colored the same, and the declaration of local variables is uncolored. Only member functions are appropriately colored.
For some reason, the variable.other.local property is ignored.
LHS usages of foo are captured by variable.other, but declarations are RHS usages are not.
bar in the class definition is ignored by variable.other.property.
If .bar is the last thing in a line, it is correctly colored by variable.other.property.
If .bar is in the middle of a line, it is ignored by variable.other.property and colored using variable.other.
For the sake of comparison, here is what those same rules look like using the Light+ theme:
It works exactly as expected!
Why would variable.other.local work for one theme but not another? It's my understanding that VS Code simply labels all words with a type and a theme simply decides what color each type should be. Is the theme somehow using a different syntax engine?
I have the following C++ code snippet colored using the default Light+ theme:
To achieve it, all I needed to add to settings was
Local variables are black, member variables are dark blue, and member functions are dark gold. Even in a chain of calling, member variables and member functions are highlighted appropriately.
However, when I use the OneHalf Light with the same setting as above, I get the following:
The member variable in the class itself is uncolored, member and local variables are colored the same, and the declaration of local variables is uncolored. Only member functions are appropriately colored.
For some reason, the
variable.other.local
property is ignored.Here is the closest I can get:
Those configurations give me this:
So:
entity.name.function
seems to work correctly.variable.other.local
is completely ignored.foo
are captured byvariable.other
, but declarations are RHS usages are not.bar
in the class definition is ignored byvariable.other.property
..bar
is the last thing in a line, it is correctly colored byvariable.other.property
..bar
is in the middle of a line, it is ignored byvariable.other.property
and colored usingvariable.other
.For the sake of comparison, here is what those same rules look like using the Light+ theme:
It works exactly as expected!
Why would
variable.other.local
work for one theme but not another? It's my understanding that VS Code simply labels all words with a type and a theme simply decides what color each type should be. Is the theme somehow using a different syntax engine?