shaunsingh / nord.nvim

Neovim theme based off of the Nord Color Palette, written in lua with tree sitter support
GNU General Public License v2.0
803 stars 107 forks source link

Vimdiff Whitespace Highlighting #106

Closed austinliuigi closed 2 years ago

austinliuigi commented 2 years ago

For some reason, it seems like vimdiff highlighting is a bit buggy. I tested it with the tokyonight colorscheme to make sure it wasn't an issue with neovim itself, but tokyonight seems to have no problem with it.

Tokyonight:

image

Nord:

image
antoineco commented 2 years ago

@austinliuigi are you referring to the aggressive background colors or to the listchars (e.g. end-of-line marker) which are highlighted with a black background?

The former can be easily tweaked by using nord1 as background color for diffs instead of this reverse effect:

image

Incidentally, this also makes listchars blend better with the background (I deliberately changed their colors to nord9 here to make them stand out in the screenshot, but the default is also nord1).

image

I'm happy to send a PR with a suggestion to make it the default if you like what I just showed.

shaunsingh commented 2 years ago

Looks great, a pr would be wonderful

antoineco commented 2 years ago

@shaunsingh @austinliuigi actually a PR won't be necessary. I just realized this theme already supports let g:nord_uniform_diff_background = 1 since #100, just like the official Vim theme.

Use this in your init.lua and you're good to go:

vim.g.nord_uniform_diff_background = true