shaunsingh / nord.nvim

Neovim theme based off of the Nord Color Palette, written in lua with tree sitter support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

diff bg colors not working

LordTlasT opened this issue · comments

commented

I installed this theme and it looks awesome! Big big thanks :)
I recently started learning lua and neovim and I have this issue...
Diff highlighting is not working,

How I set my colorscheme:

function ColorMyPencils(color)
	color = color or "nord"
	vim.cmd.colorscheme(color)
	vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
	vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
	vim.cmd.highlight("SignColumn guibg=none")
end
ColorMyPencils()

How I enable treesitter:

require'nvim-treesitter.configs'.setup {
  ensure_installed = { "c", "lua", "vim", "help", "diff"},
  sync_install = false,
  auto_install = true,
  highlight = {
    enable = true,
    additional_vim_regex_highlighting = false,
  },
}

nvim -v:

NVIM v0.8.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by builduser

(I have a vim folder and vimrc in my home directory but I never source it)

By doing this I can get the bg colors to display:

diff --git a/lua/nord/theme.lua b/lua/nord/theme.lua
index 01fdf6b..1c93e5d 100644
--- a/lua/nord/theme.lua
+++ b/lua/nord/theme.lua
@@ -459,6 +459,10 @@ theme.loadFiletypes = function()
yamlTSString = { fg = nord.nord4_gui },
yamlTSPunctSpecial = { link = "Keyword" },
yamlKey = { fg = nord.nord7_gui }, -- stephpy/vim-yaml
+
+		-- diff
+		["@text.diff.add"] = { link = "DiffAdd" },
+		["@text.diff.delete"] = { link = "DiffDelete" },
}

return ft

I don't understand what I'm doing, I just looked at the tokyonight colorscheme code

It works if I disable treesitter by removing the this file, then it is relying on syntax.vim if understand correctly
Every plugin is installed with packer and is using its latest version,
Should I provide more information? This also does not work in the gitcommit file type

Please help me