feat: improve diff highlight #121

Closed
opened 2026-02-15 08:33:37 +00:00 by phcurado · 3 comments
phcurado commented 2026-02-15 08:33:37 +00:00

Prerequisites

Problem

For my colorscheme, it's difficult to read the diff with the current green/red colors

Image

Here how diffview looks like

Image

Proposed solution

This is not a big deal, I can still read clearly using diffs.nvim. The proposed improvement would be to soften the background color like diffview is doing or improve the green/red colors to be more noticeable

Alternatives considered

No response

### Prerequisites - [x] I have searched [existing issues](https://github.com/barrettruth/diffs.nvim/issues) ### Problem For my colorscheme, it's difficult to read the diff with the current green/red colors <img width="1121" height="1368" alt="Image" src="https://github.com/user-attachments/assets/b77c3994-a637-484d-988a-bd7d7557089f" /> Here how diffview looks like <img width="1121" height="1368" alt="Image" src="https://github.com/user-attachments/assets/64cc6332-5b58-415a-8414-7448238a5d8d" /> ### Proposed solution This is not a big deal, I can still read clearly using diffs.nvim. The proposed improvement would be to soften the background color like diffview is doing or improve the green/red colors to be more noticeable ### Alternatives considered _No response_
barrettruth commented 2026-02-15 16:10:23 +00:00
  1. Consider tuning the alpha config parameter. Does this do what you want?
  2. Can you please elaborate specifically about exactly which colors (bg, fg, perhaps a text/line reference) can be more clear? Just so we're talking about the same thing.
1. Consider tuning the alpha config parameter. Does this do what you want? 2. Can you please elaborate _specifically_ about exactly which colors (bg, fg, perhaps a text/line reference) can be more clear? Just so we're talking about the same thing.
phcurado commented 2026-02-15 16:21:27 +00:00

Changing blend_alpha:

vim.g.diffs = {
  neogit = true,
  highlights = {
    blend_alpha = 1.1,
  },
}

This helped alot, it's very clear now the green/red.

For the background, checked the 2nd picture, it seems diffview add some color on the background so the red/green is easier to see.

I will close the issue, the blend_alpha resolved the issue for me, thank you!

Changing blend_alpha: ```lua vim.g.diffs = { neogit = true, highlights = { blend_alpha = 1.1, }, } ``` This helped alot, it's very clear now the green/red. For the background, checked the 2nd picture, it seems diffview add some color on the background so the red/green is easier to see. I will close the issue, the blend_alpha resolved the issue for me, thank you!
barrettruth commented 2026-02-15 16:33:06 +00:00

@phcurado awesome! Super glad this worked for you. If there's absolutely anything that I can do to make the neogit experience better let me know.

@phcurado awesome! Super glad this worked for you. If there's absolutely anything that I can do to make the neogit experience better let me know.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
barrettruth/diffs.nvim#121
No description provided.