typescript - VSC color theme customization for new class instances in TS - Stack Overflow

Im trying to change color for my vsc. Now when i check developer: inspect editor tokens and scopes the

Im trying to change color for my vsc. Now when i check developer: inspect editor tokens and scopes the instance of new class it shows me only:

(.png

but switching to dark theme i got semantic token type instead of textmate scope
.png

JSON with my theme have

"semanticTokenColors": {
        "class": {
            "foreground": "#4EC9B0"
        }
    },

also in

    "tokenColors": [
        {
            "name": "Types declaration and references",
            "scope": [
                "support.class",
                "support.type",
                "entity.name.type",
                "entity.name.namespace",
                "entity.other.attribute",
                "entity.name.scope-resolution",
                "entity.name.class",
                "storage.type.numeric.go",
                "storage.type.byte.go",
                "storage.type.boolean.go",
                "storage.type.string.go",
                "storage.type.uintptr.go",
                "storage.type.error.go",
                "storage.type.rune.go",
                "storage.type.cs",
                "storage.type.generic.cs",
                "storage.type.modifier.cs",
                "storage.type.variable.cs",
                "storage.type.annotation.java",
                "storage.type.generic.java",
                "storage.type.java",
                "storage.type.object.array.java",
                "storage.type.primitive.array.java",
                "storage.type.primitive.java",
                "storage.type.token.java",
                "storage.type.groovy",
                "storage.type.annotation.groovy",
                "storage.type.parameters.groovy",
                "storage.type.generic.groovy",
                "storage.type.object.array.groovy",
                "storage.type.primitive.array.groovy",
                "storage.type.primitive.groovy"
            ],
            "settings": {
                "foreground": "#4EC9B0"
            }
        },

but this still doesn't work. What should I do in order to get my theme treat new ClassName as semantic token type ?

Tried to change values in my json theme.

In order to reproduce install my theme:
.solracss-theme
Then create any class and create new object of this class in ts.


class Test {
  constructor() {}
}
 const test = new Test();

Then switch to deafault theme (Dark +) in vsc.
Run ctrl+shit+p type: inspect editor tokens and scopes and click on class name Test()

You should see this:
enter image description here

Then switch to my theme, repeat inspect..., and you will get:
enter image description here

How can I set on my theme that object will have class color assigned to semantic token type instead of textmate -> function as I got now.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744059599a4551535.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信