mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-12-12 17:18:22 -05:00
43 lines
1.8 KiB
Lua
43 lines
1.8 KiB
Lua
return require('gitsigns').setup {
|
|
signs = {
|
|
add = {hl = 'DiffAdd' , text = '', numhl='GitSignsAddNr'},
|
|
change = {hl = 'DiffChange', text = '', numhl='GitSignsChangeNr'},
|
|
delete = {hl = 'DiffDelete', text = '', numhl='GitSignsDeleteNr'},
|
|
topdelete = {hl = 'DiffDelete', text = '', numhl='GitSignsDeleteNr'},
|
|
changedelete = {hl = 'DiffChange', text = '', numhl='GitSignsChangeNr'}
|
|
},
|
|
numhl = true,
|
|
keymaps = {
|
|
-- Default keymap options
|
|
noremap = true,
|
|
buffer = true,
|
|
|
|
['n ]g'] = {expr = true, '&diff ? \']g\' : \'<cmd>lua require"gitsigns.actions".next_hunk()<CR>\''},
|
|
['n [g'] = {expr = true, '&diff ? \'[g\' : \'<cmd>lua require"gitsigns.actions".prev_hunk()<CR>\''},
|
|
|
|
['n <leader>gs'] = '<cmd>lua require"gitsigns".stage_hunk()<CR>',
|
|
['v <leader>gs'] = '<cmd>lua require"gitsigns".stage_hunk({vim.fn.line("."), vim.fn.line("v")})<CR>',
|
|
['n <leader>gu'] = '<cmd>lua require"gitsigns".undo_stage_hunk()<CR>',
|
|
['n <leader>gr'] = '<cmd>lua require"gitsigns".reset_hunk()<CR>',
|
|
['v <leader>gr'] = '<cmd>lua require"gitsigns".reset_hunk({vim.fn.line("."), vim.fn.line("v")})<CR>',
|
|
['n <leader>gR'] = '<cmd>lua require"gitsigns".reset_buffer()<CR>',
|
|
['n <leader>gp'] = '<cmd>lua require"gitsigns".preview_hunk()<CR>',
|
|
['n <leader>gb'] = '<cmd>lua require"gitsigns".blame_line(true)<CR>'
|
|
},
|
|
watch_index = {
|
|
interval = 1000,
|
|
follow_files = true
|
|
},
|
|
current_line_blame = false,
|
|
current_line_blame_opts = {
|
|
delay = 1000,
|
|
virt_text = true,
|
|
virt_text_pos = 'eol'
|
|
},
|
|
sign_priority = 6,
|
|
update_debounce = 100,
|
|
status_formatter = nil, -- Use default
|
|
word_diff = false,
|
|
use_internal_diff = true -- If luajit is present
|
|
}
|