mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-11-25 00:38:23 -05:00
neovim: update config for gitsigns.nvim
This commit is contained in:
parent
fc2f231aaf
commit
22945505ed
@ -189,7 +189,9 @@ wk.register({
|
|||||||
r = 'Reset hunk',
|
r = 'Reset hunk',
|
||||||
R = 'Reset all hunks in buffer',
|
R = 'Reset all hunks in buffer',
|
||||||
s = 'Stage hunk',
|
s = 'Stage hunk',
|
||||||
|
S = 'Stage buffer',
|
||||||
u = 'Undo hunk',
|
u = 'Undo hunk',
|
||||||
|
U = 'Reset buffer index',
|
||||||
n = {':Neogit<CR>', 'Neogit'},
|
n = {':Neogit<CR>', 'Neogit'},
|
||||||
f = {
|
f = {
|
||||||
name = 'Telescope',
|
name = 'Telescope',
|
||||||
|
@ -426,11 +426,13 @@ function M.gitsigns_conf()
|
|||||||
topdelete = {hl = 'DiffDelete', text = '', numhl='GitSignsDeleteNr'},
|
topdelete = {hl = 'DiffDelete', text = '', numhl='GitSignsDeleteNr'},
|
||||||
changedelete = {hl = 'DiffChange', text = '', numhl='GitSignsChangeNr'}
|
changedelete = {hl = 'DiffChange', text = '', numhl='GitSignsChangeNr'}
|
||||||
},
|
},
|
||||||
|
signcolumn = false,
|
||||||
numhl = true,
|
numhl = true,
|
||||||
|
linehl = false,
|
||||||
|
word_diff = false,
|
||||||
keymaps = {
|
keymaps = {
|
||||||
-- Default keymap options
|
-- Default keymap options
|
||||||
noremap = true,
|
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".next_hunk()<CR>\''},
|
||||||
['n [g'] = {expr = true, '&diff ? \'[g\' : \'<cmd>lua require"gitsigns.actions".prev_hunk()<CR>\''},
|
['n [g'] = {expr = true, '&diff ? \'[g\' : \'<cmd>lua require"gitsigns.actions".prev_hunk()<CR>\''},
|
||||||
@ -442,7 +444,13 @@ function M.gitsigns_conf()
|
|||||||
['v <leader>gr'] = '<cmd>lua require"gitsigns".reset_hunk({vim.fn.line("."), vim.fn.line("v")})<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>gR'] = '<cmd>lua require"gitsigns".reset_buffer()<CR>',
|
||||||
['n <leader>gp'] = '<cmd>lua require"gitsigns".preview_hunk()<CR>',
|
['n <leader>gp'] = '<cmd>lua require"gitsigns".preview_hunk()<CR>',
|
||||||
['n <leader>gb'] = '<cmd>lua require"gitsigns".blame_line(true)<CR>'
|
['n <leader>gb'] = '<cmd>lua require"gitsigns".blame_line(true)<CR>',
|
||||||
|
['n <leader>gS'] = '<cmd>lua require"gitsigns".stage_buffer()<CR>',
|
||||||
|
['n <leader>gU'] = '<cmd>lua require"gitsigns".reset_buffer_index()<CR>',
|
||||||
|
|
||||||
|
-- Text objects
|
||||||
|
['o ih'] = ':<C-U>lua require"gitsigns.actions".select_hunk()<CR>',
|
||||||
|
['x ih'] = ':<C-U>lua require"gitsigns.actions".select_hunk()<CR>'
|
||||||
},
|
},
|
||||||
watch_index = {
|
watch_index = {
|
||||||
interval = 1000,
|
interval = 1000,
|
||||||
@ -454,11 +462,27 @@ function M.gitsigns_conf()
|
|||||||
virt_text = true,
|
virt_text = true,
|
||||||
virt_text_pos = 'eol'
|
virt_text_pos = 'eol'
|
||||||
},
|
},
|
||||||
|
current_line_blame_formatter_opts = {
|
||||||
|
relative_time = false
|
||||||
|
},
|
||||||
sign_priority = 6,
|
sign_priority = 6,
|
||||||
update_debounce = 100,
|
update_debounce = 100,
|
||||||
status_formatter = nil, -- Use default
|
status_formatter = nil, -- Use default
|
||||||
word_diff = false,
|
max_file_length = 40000,
|
||||||
use_internal_diff = true -- If luajit is present
|
preview_config = {
|
||||||
|
-- Options passed to nvim_open_win
|
||||||
|
border = 'single',
|
||||||
|
style = 'minimal',
|
||||||
|
relative = 'cursor',
|
||||||
|
row = 0,
|
||||||
|
col = 1
|
||||||
|
},
|
||||||
|
yadm = {
|
||||||
|
enable = false
|
||||||
|
},
|
||||||
|
diff_opts = {
|
||||||
|
internal = true -- If luajit is present
|
||||||
|
}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user