Open eduardoarandah opened 1 year ago
Diffview also has no highlighting for changed code (added/deleted has green/red background). It works well in Tokyonight theme. It uses darken method: https://github.com/folke/tokyonight.nvim/blob/735e94f3b36ae8b0caa30d1806eb2fa1c3619ca6/lua/tokyonight/colors.lua#LL119C8-L119C8 It highlights only the background with a darker color. Code has still all of its colors.
I added the necessary overrides to make it look better:
overrides = {
DiffAdd = { bg = darken(colors.bright_green, 0.15) },
DiffDelete = { fg = colors.bright_red },
DiffChange = { bg = darken(colors.comment, 0.15) },
DiffText = { bg = darken(colors.comment, 0.50) },
illuminatedWord = { bg = darken(colors.comment, 0.65) },
illuminatedCurWord = { bg = darken(colors.comment, 0.65) },
IlluminatedWordText = { bg = darken(colors.comment, 0.65) },
IlluminatedWordRead = { bg = darken(colors.comment, 0.65) },
IlluminatedWordWrite = { bg = darken(colors.comment, 0.65) },
},
I copied darken
methods and other needed helpers from Tokyonight.
Illuminate also needs to be overwritten because dracula.nvim doesn't color it by default.
I will implement it this weekend
Looking forward to this change :) meanwhile using @lucasrabiec override configuration.
Would also love to see this change :D
Plugin: fugitive Command: Gdiffsplit HEAD~1 Plugin manager: lazy
Expecting: diff hightlighting
When changing to built-in theme slate it works
:colorscheme slate
Tried: loading theme first by setting priority in lazy as in the example
https://github.com/folke/lazy.nvim#examples
However... when I delete a block in my working copy, then hightlighting works.
Kind of solved:
I manually added this and it worked: