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

Syntax highlighting in diff mode #242

Closed
Niverton opened this issue Apr 12, 2023 · 2 comments
Closed

Syntax highlighting in diff mode #242

Niverton opened this issue Apr 12, 2023 · 2 comments

Comments

@Niverton
Copy link

Is your feature request related to a problem? Please describe.
When using diff mode, the text is black on a bright background (in dark mode). This is not nice on the eye, and makes large changes in a code base (big DiffAdd blocks especially) hard to read due to the lack of syntax highlighting. See #105 for previous discussions on the subject. The issue is also present in the original community edition gruvbox, and an issue is also open there gruvbox-community/gruvbox#173

Describe the solution you'd like
One solution is to change the diff highlight groups to only affect the background, keeping the foreground with syntax highlights. See #225 and #235 for implementation attempts.
This is the solution employed by several themes, like catpuccin
https://github.com/catppuccin/nvim/blob/main/lua/catppuccin/groups/syntax.lua#L74-L77
Catpuccin uses the same technique I used in #235 - blending the color with the background - except I did that offline and they do it in lua.

This is not to the taste of everyone, so an option can be added to set the feature.

Additional context
See #105, #225 and #235 for screenshots and previous discussions on the subject.

@polyzen
Copy link
Contributor

polyzen commented Apr 12, 2023

#239

@Niverton
Copy link
Author

#239

My bad, not really familiar with github I did not know the discussion section existed at all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants