Skip to content

Extract highlighting tags to an enum #2563

@matklad

Description

@matklad

We use strings to tag syntax-highlighted tokens: https://github.com/rust-analyzer/rust-analyzer/blob/d6223253b628b279f9ddae8f83f7173d01f6b32c/crates/ra_ide/src/syntax_highlighting.rs#L119

This is less than idea, because there's no single place that lists all the tags. We should fix it by either using an enum, or declaring all the tags as named constants (I lean towards the latter option).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions