Skip to content

Behavior with enum variants, using treesitter  #518

Open
@sebastiencs

Description

@sebastiencs

Hello

I just tested the new rust-ts-mode with emacs 29, and it seems to be working well.
I can already see some improvements, compared to some cases where rust-mode was having some issues, both in fontifications and identations.
Thanks to everyone who worked on that integration.

However I've noticed an issue with enum variants:

This is my buffer using the legacy rust-mode:
Screenshot from 2024-02-26 23-23-04

The same buffer using rust-ts-mode, with treesit-font-lock-level set to 3:
Notice the variants are using white color.

Screenshot from 2024-02-26 23-22-26

Same buffer using rust-ts-mode, with treesit-font-lock-level set to 4:
Here we have 3 different colors, for variants
Screenshot from 2024-02-26 23-22-43

Ideally I would like to get the same colors/fontification than rust-mode (variants in green).
What would be the correct way to customize that ?

Thanks
cc @casouri @psibi

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions