Files
dotfiles/.config/nvim/lua/plugins/gitsigns.lua
T
cdanesi 66ad3aa181 try to bring yadm functionality back into gitsigns (not working)
I think the _on_attach_pre is working, but getting an error when adding
on_attach = function(bufnr) to the gitsigns config..

Started from my MBP at work, syncing so I can pick it up on another
laptop over the weekend if I have time
2024-10-26 11:22:18 -04:00

50 lines
1.5 KiB
Lua

local setup, gitsigns = pcall(require, "gitsigns")
if not setup then
return
end
gitsigns.setup {
_on_attach_pre =
function(_, callback)
vequire("gitsigns-yadm").yadm_signs(callback)
end,
signs = {
add = { text = '+' },
change = { text = '' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
untracked = { text = '' },
},
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
watch_gitdir = {
interval = 1000,
follow_files = true
},
attach_to_untracked = true,
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 = 200,
ignore_whitespace = false,
},
current_line_blame_formatter = '<author>, <author_time:%Y-%m-%d> - <summary>',
sign_priority = 6,
update_debounce = 100,
status_formatter = nil, -- Use default
max_file_length = 40000, -- Disable if file is longer than this (in lines)
preview_config = {
-- Options passed to nvim_open_win
border = 'single',
style = 'minimal',
relative = 'cursor',
row = 0,
col = 1
},
-- on_attach = function(bufnr)
}