Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve rust syntax highlighting. #7679

Closed
1 task done
gloridifice opened this issue Feb 12, 2024 · 4 comments
Closed
1 task done

Improve rust syntax highlighting. #7679

gloridifice opened this issue Feb 12, 2024 · 4 comments
Labels
enhancement [core label] language An umbrella label for all programming languages syntax behaviors rust Rust programming language support

Comments

@gloridifice
Copy link

gloridifice commented Feb 12, 2024

Check for existing issues

  • Completed

Describe the feature

Some improvement points I found of zed rust syntax highlighting are below.

lifetime

Color rust lifetime.

Zed ⬇️
Snipaste_2024-02-12_12-14-01

RustRover (Expected) ⬇️
Snipaste_2024-02-12_12-30-06
Snipaste_2024-02-12_12-36-37

generic

Color generic with a separate color. (now it's same as "type")
Zed ⬇️
Snipaste_2024-02-12_12-29-20
RustRover (Expected) ⬇️
Snipaste_2024-02-12_12-28-25

proc macro

Color proc macros with a separate color. (Now it's same as "editor.foreground")
Zed ⬇️
Snipaste_2024-02-12_12-14-20
Snipaste_2024-02-12_12-14-43

RustRover (Expected) ⬇️
Snipaste_2024-02-12_12-32-57
Snipaste_2024-02-12_12-33-04

macro's name

Recognize macro name's ! as a whole. (I don't know if this is intentional)

Zed ⬇️
Snipaste_2024-02-12_12-15-24

If applicable, add mockups / screenshots to help present your vision of the feature

No response

@JosephTLyons JosephTLyons added rust Rust programming language support language An umbrella label for all programming languages syntax behaviors and removed triage labels Feb 13, 2024
@universalmind303
Copy link

some additional examples

zed

image

VSCode

image

@mascanho
Copy link

Is this still a global issue or is it just my zed? It seems like the syntax highlight lacks a bit, a lot of things share the same colour, especially when compared to neovim. Thank you for the amazing effort everyone.

@nathansobo
Copy link
Contributor

@iamnbutler What are your thoughts on coloring lifetimes in our themes? It would indeed be nice to make them stand out a bit more like the examples people are showing.

@roycrippen4
Copy link
Contributor

I really, really like having type arguments/lifetimes both colorized and italicized.

Neovim

Image

Zed

Image

It would be awesome to reuse my existing tree-sitter queries to merge/override zed's queries and just tweak the colors associated with the matches. Colors that differentiate between primitive types and type identifiers would also be great.

The lack of a user-facing, fine-grained customization for syntax highlighting is less than ideal. That said, it seems like zed is close to super-customizable and the vim integration probably the best outside of vim/neovim.

@zed-industries zed-industries locked and limited conversation to collaborators Feb 6, 2025
@SomeoneToIgnore SomeoneToIgnore converted this issue into discussion #24361 Feb 6, 2025

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
enhancement [core label] language An umbrella label for all programming languages syntax behaviors rust Rust programming language support
Projects
None yet
Development

No branches or pull requests

6 participants