Skip to content

Add support for semantic token enumMember declaration modifier #12039

Open

Description

Feature Request

Right now, enums have the semantic token type enumMember but without modifiers. I'd like to distinguish between declaration and usage.

In my color theme, I have opted to use a green color for constants. I'd like it so that I could make enum usage be green but usage only. Not the enum declaration/definition.

This is what's currently possible:

image

I can apply my green color to the enumMember sematic token.

image

However, that makes the enum definition also green which I don't want. Here you can see that green is applied on both sides of the equals sign.

image

I'd like this to stay like this

image

But there's no way to accomplish this without a semantic token modifier. I've tried TextMate scope mappings and contribution points to as a workaround but it's not possible and I cannot disable semantic highlighting because it will just lead to other issues. The semantic highlighting rules takes precedence.

I would really appreciate if we could get a declaration modifier for enums, so that I can have my enum declaration appear in a my natural foreground color but when used as a literal constant value, use my green color.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status

      No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions