Skip to content
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 diff syntax highlighting queries #21740

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

uncenter
Copy link
Contributor

@uncenter uncenter commented Dec 9, 2024

Brings over the improvements made for the same grammar: nvim-treesitter/nvim-treesitter#6619.

Related to #19986 but not really- the problem brought up there is an issue of themes not supporting the diff.plus and diff.minus captures (already used before this PR).

Theme previews (before/after)
Before After
CleanShot 2024-12-09 at 07 33 31 CleanShot 2024-12-09 at 07 31 08
Before After
CleanShot 2024-12-09 at 07 34 15 CleanShot 2024-12-09 at 07 31 36
Before After
CleanShot 2024-12-09 at 07 34 27 CleanShot 2024-12-09 at 07 31 53
Before After
CleanShot 2024-12-09 at 07 33 44 CleanShot 2024-12-09 at 07 32 13
Before After
CleanShot 2024-12-09 at 07 33 57 CleanShot 2024-12-09 at 07 32 25

Release Notes:

  • Improved diff syntax highlighting

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Dec 9, 2024
@mikayla-maki
Copy link
Member

Thank you!

@mikayla-maki mikayla-maki merged commit 9a806f9 into zed-industries:main Dec 12, 2024
16 checks passed
@uncenter uncenter deleted the patch-2 branch December 12, 2024 23:23
@dzuelke
Copy link

dzuelke commented Feb 21, 2025

@uncenter What theme is that in your first screenshot? I still can't get any of my installed themes (and I added many more, just for testing) to show diff lines in red and green.

@uncenter
Copy link
Contributor Author

@uncenter What theme is that in your first screenshot? I still can't get any of my installed themes (and I added many more, just for testing) to show diff lines in red and green.

Catppuccin is the theme, it covers the most scopes of any theme. The scopes that make diff lines red and green are diff.plus and diff.minus, but those don't seem to be covered in almost any of the themes besides Catppuccin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants