Skip to content

Semantic Token Type "operator.logicalNot" Please! #19943

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
daniel-pfeiffer opened this issue Jun 8, 2025 · 0 comments
Open

Semantic Token Type "operator.logicalNot" Please! #19943

daniel-pfeiffer opened this issue Jun 8, 2025 · 0 comments
Labels
C-feature Category: feature request

Comments

@daniel-pfeiffer
Copy link

daniel-pfeiffer commented Jun 8, 2025

IMHO, two easy to oversee characters need strong highlighting, as they completely alter flow of control: ? and !.

In VScode for the former I happily have

    "editor.semanticTokenColorCustomizations": {
        "rules": {
            "operator.controlFlow:rust": {
                "bold": true,
                "foreground": "#ff8800",
            }
        }
    },

For the latter there is no modifier, operator alone being far too vague. So instead I tried a still too vague (&& and || should not be made more visible!) old style

    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": "keyword.operator.logical.rust",
                "settings": {
                    "fontStyle": "bold",
                    "foreground": "#ff8800"
                }
            }
        ]
    },

Alas this gets recognised but ignored. Though more vague (operator vs. operator.logical) in this case, semantic seems to take precedence. So please add a modifier logicalNot to !, so that I can add it to semanticTokenColorCustomizations!

@daniel-pfeiffer daniel-pfeiffer added the C-feature Category: feature request label Jun 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: feature request
Projects
None yet
Development

No branches or pull requests

1 participant