Skip to content

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

Open
@daniel-pfeiffer

Description

@daniel-pfeiffer

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-featureCategory: feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions