projekt0n / github-nvim-theme

Github's Neovim themes
MIT License
2.02k stars 104 forks source link

Inline diff change highlighting is unclear #334

Closed adambarjo closed 1 week ago

adambarjo commented 1 week ago

Hello. Really enjoying this theme so far, but I've encountered an issue which is making it difficult to continue using it.

image

The image above illustrates 2 changes, one where a word is changed and one where some spaces are added. The background highlighting of the changed word is very difficult to see, and the text being white takes away its syntax highlighting. Particularly with the added spaces, it's very easy to miss.

Comparing this to another theme, such as catppuccin, the highlighting makes it clear to see the change and preserves syntax highlighting:

image

Please could you provide some guidance on how I can alter my theme to make the diff appear clearer? I would be happy to make a PR as well for the change if it is considered an improvement. Thanks

adambarjo commented 1 week ago

For anyone else who stumbles across this, you can use overrides to fix the diff highlights and preserve syntax highlighting in diffs. Here is how I fixed it in my setup config:

{
  groups = {
    all = {
      DiffAdd = { bg = palette.scale.green[10], fg = "none" },
      DiffChange = { bg = palette.scale.yellow[10], fg = "none" },
      DiffText = { bg = palette.scale.yellow[8], fg = "none" },
    },
  },
}

image