fix(highlight): use diffAdded/diffRemoved fg for char-level backgrounds
The previous 70% alpha blend of DiffAdd bg was nearly identical to the 40% line-level blend, making char-level highlights invisible. Now blends the bright diffAdded/diffRemoved foreground color (same base as line number fg) into the char-level bg, matching GitHub/VSCode intensity. Also bumps intra.max_lines default from 200 to 500.
This commit is contained in:
parent
63b6e7d4c6
commit
f1c13966ba
2 changed files with 13 additions and 12 deletions
|
|
@ -91,7 +91,7 @@ local default_config = {
|
|||
intra = {
|
||||
enabled = true,
|
||||
algorithm = 'auto',
|
||||
max_lines = 200,
|
||||
max_lines = 500,
|
||||
},
|
||||
},
|
||||
fugitive = {
|
||||
|
|
@ -183,8 +183,8 @@ local function compute_highlight_groups()
|
|||
local blended_add = blend_color(add_bg, bg, 0.4)
|
||||
local blended_del = blend_color(del_bg, bg, 0.4)
|
||||
|
||||
local blended_add_text = blend_color(add_bg, bg, 0.7)
|
||||
local blended_del_text = blend_color(del_bg, bg, 0.7)
|
||||
local blended_add_text = blend_color(add_fg, bg, 0.4)
|
||||
local blended_del_text = blend_color(del_fg, bg, 0.4)
|
||||
|
||||
vim.api.nvim_set_hl(0, 'DiffsAdd', { default = true, bg = blended_add })
|
||||
vim.api.nvim_set_hl(0, 'DiffsDelete', { default = true, bg = blended_del })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue