I noticed that the Default Dark+
theme has a different color for variables than the Visual Studio Dark
theme.
Dark+
has two different colors for the variable and member.
I personally use the Community Material Theme Darker High Contrast
theme and would like to override this setting.
But if I set the variable color i get the following result:
"editor.tokenColorCustomizations": {
"[Community Material Theme Darker High Contrast]": {
"variables": "#ff0000"
}
}
How can I set the variable color to only affect it at declaration and reference like in Default Dark+
?
TL;DR how can I set different colors for test
and key
on line 2.
2
Answers
Based on @user's answer and TextMate scope inspector I came to the following solution. Because I use TypeScript, I had to add the corresponding scopes for that too.
I loved the base theme but it uses too much white. This will improve visibility for me. 🙂
Start by using the builtin TextMate scope inspector tool.
Using it, you’ll find that your
test
object has the semantic token typevariable.other.constant.object.js
andvariable
, and yourkey
field hasvariable.other.property.js
.So for example, inside your
"[Community Material Theme Darker High Contrast]": {
: