config.nvim/lua/plugins/gitsigns.lua

34 lines
1.1 KiB
Lua
Raw Normal View History

2021-10-25 12:10:08 +08:00
require('gitsigns').setup {
2022-05-03 14:36:01 +08:00
-- signs
status_formatter = nil, -- Use default
numhl = false,
sign_priority = 10,
2022-05-04 21:58:26 +08:00
attach_to_untracked = false, -- fix gitsigns with yadm in ~
2021-10-25 12:10:08 +08:00
signs = {
2022-05-03 14:36:01 +08:00
add = {hl = "DiffAdd", text = "+", numhl = "GitSignsAddNr"},
change = {hl = "DiffChange", text = ">", numhl = "GitSignsChangeNr"},
2021-10-25 12:10:08 +08:00
changedelete = {
hl = "DiffChange",
text = "~",
numhl = "GitSignsChangeNr"
},
delete = {hl = "DiffDelete", text = "_", numhl = "GitSignsDeleteNr"},
topdelete = {
hl = "DiffDelete",
text = "",
numhl = "GitSignsDeleteNr"
}
},
2023-06-09 15:56:41 +08:00
-- yadm = {enable = true},
2021-10-25 12:10:08 +08:00
2022-05-03 14:36:01 +08:00
-- Current line blame
current_line_blame = true, -- Toggle with `:Gitsigns toggle_current_line_blame`
current_line_blame_opts = {
virt_text = true,
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
delay = 250,
ignore_whitespace = false
},
current_line_blame_formatter = '<author>, <author_time:%Y-%m-%d> - <summary>'
2021-10-25 12:10:08 +08:00
}