Binaryify / OneDark-Pro

Atom's iconic One Dark theme for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=zhuangtongfa.Material-theme
MIT License
1.52k stars 289 forks source link

Customizing color of comparsion operators doesn't take effect #760

Closed safarli closed 2 years ago

safarli commented 2 years ago

Describe the bug Customizing "keyword.operator.logical" doesn't work.

To Reproduce Steps to reproduce the behavior:

  1. Open settings.json
  2. Add:
    "editor.tokenColorCustomizations": {
    "textMateRules": [
      {
        "scope": "keyword.operator.logical",
        "settings": {
          "foreground": "#ff00ff",
          "fontStyle": "bold"
        }
      }
    ]
    }

    Expected behavior Expected color change, but it doesn't change. Tried this customization with other themes and they worked.

Screenshots & Example Code

Desktop

Additional context

safarli commented 2 years ago

I've also checked it in Vscode Insiders v1.72.0 fresh install, it didn't work either.

safarli commented 2 years ago

I've tested following settings and they are working:

Binaryify commented 2 years ago

plz try customizing semanticTokenColorCustomizations like this~ image

safarli commented 2 years ago

plz try customizing semanticTokenColorCustomizations like this~ image

Even tried most of them, but no luck. It didn't work either.

code

Binaryify commented 2 years ago

could you provide some code

safarli commented 2 years ago

could you provide some code

Can you test it yourself, only how to customize those comparison opeartors please?, ignore what I've done

safarli commented 2 years ago

could you provide some code

I've fresh installation of VS Code Insiders version, no other extensions installed except 'One Dark Pro'. Below are settings.json settings:

{
    "workbench.colorTheme": "One Dark Pro",
    "editor.semanticTokenColorCustomizations": {
        "rules": {
            "operator": {
                "foreground": "#ff0000"
            },
            "keyword": {
                "foreground": "#ff0000"
            }
        }
    },
    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": [
                    "comment",
                    "keyword",
                    "storage",
                    "keyword.control",
                    "keyword.control.from",
                    "keyword.control.flow",
                    "keyword.operator.new",
                    "keyword.control.import",
                    "keyword.control.export",
                    "keyword.control.default",
                    "keyword.control.trycatch",
                    "keyword.control.conditional",
                    "storage.type",
                    "storage.type.class",
                    "storage.modifier.tsx",
                    "storage.type.function",
                    "storage.modifier.async",
                    "variable.language",
                    "variable.language.this",
                    "variable.language.super",
                    "meta.class",
                    "meta.var.expr",
                    "constant.language.null",
                    "support.type.primitive",
                    "entity.name.method.js",
                    "entity.other.attribute-name",
                    "punctuation.definition.comment",
                    "text.html.basic entity.other.attribute-name",
                    "tag.decorator.js entity.name.tag.js",
                    "tag.decorator.js punctuation.definition.tag.js",
                    "source.js constant.other.object.key.js string.unquoted.label.js"
                ],
                "settings": {
                    "foreground": "#FF0000",
                    "fontStyle": "bold"
                }
            }
        ]
    }
}

Again, no luck, everything changes, except comparison operators.

Binaryify commented 2 years ago

image had you check the code scope

safarli commented 2 years ago

image had you check the code scope

Oh, thanks, I found the keys for it, they are keyword.operator.comparison & keyword.operator.relational. But, suprisingly they don't show up on intellisense/quick suggestions . Also, more general keyword.operator doesn't have effect on it (But in other color themes it works as intended. In this theme, it's probably due to overriding issues).