# rust: Highlight enum variants as variant \(\#47918\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/03663b966d0c55457c275470a143cbd3651b3b48)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 03663b966d0c55457c275470a143cbd3651b3b48

Requested commit: 03663b966d0c55457c275470a143cbd3651b3b48

Commit: 03663b966d0c55457c275470a143cbd3651b3b48

Tree: 31fac1e4c2779f6d3a44e5408e19d732675f73fc

Author: Michael Yang

Committer: GitHub

## Message

```
rust: Highlight enum variants as variant (#47918)

Improve #45546, by changing the capture to be variant instead of type.

Release Notes:

- Improved Rust enum variant highlighting as variant instead of type.

Before (note variants have the same style as `Foo`):
<img width="276" height="162" alt="image"
src="https://github.com/user-attachments/assets/fa0d8f48-a286-4a8d-b89d-269cb1657e55"
/>

After:
<img width="276" height="162" alt="image"
src="https://github.com/user-attachments/assets/c442494a-7550-481a-a8b9-f2d944a67868"
/>
```

## Parents

- [4dde88cfe561b406f82d35ddd1374b3a3104687f](https://git.cafe/gitcafe/zed/commit/4dde88cfe561b406f82d35ddd1374b3a3104687f?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/03663b966d0c55457c275470a143cbd3651b3b48?format=markdown)
