1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

enable word diff for gitsigns.nvim

Also tweak the highlight for word diff to make clear. The default
highlgiht for word diff is TermCursor, which is unreadable.
This commit is contained in:
jdhao 2022-09-24 15:34:54 +08:00
parent 7f5bf5a1b2
commit 1f3fcc604a

View File

@ -8,6 +8,7 @@ gs.setup {
topdelete = { hl = "GitSignsDelete", text = "", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" },
changedelete = { hl = "GitSignsChange", text = "", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" },
},
word_diff = true,
on_attach = function(bufnr)
local function map(mode, l, r, opts)
opts = opts or {}
@ -43,3 +44,12 @@ gs.setup {
end)
end,
}
vim.api.nvim_create_autocmd('ColorScheme', {
pattern = "*",
callback = function()
vim.cmd [[
hi GitSignsChangeInline guibg=fg guifg=bg
]]
end
})