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 all hunks in buffer',
|
||||
s = 'Stage hunk',
|
||||
S = 'Stage buffer',
|
||||
u = 'Undo hunk',
|
||||
U = 'Reset buffer index',
|
||||
n = {':Neogit<CR>', 'Neogit'},
|
||||
f = {
|
||||
name = 'Telescope',
|
||||
|
@ -426,11 +426,13 @@ function M.gitsigns_conf()
|
||||
topdelete = {hl = 'DiffDelete', text = '', numhl='GitSignsDeleteNr'},
|
||||
changedelete = {hl = 'DiffChange', text = '', numhl='GitSignsChangeNr'}
|
||||
},
|
||||
signcolumn = false,
|
||||
numhl = true,
|
||||
linehl = false,
|
||||
word_diff = false,
|
||||
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>\''},
|
||||
@ -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>',
|
||||
['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>'
|
||||
['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 = {
|
||||
interval = 1000,
|
||||
@ -454,11 +462,27 @@ function M.gitsigns_conf()
|
||||
virt_text = true,
|
||||
virt_text_pos = 'eol'
|
||||
},
|
||||
current_line_blame_formatter_opts = {
|
||||
relative_time = false
|
||||
},
|
||||
sign_priority = 6,
|
||||
update_debounce = 100,
|
||||
status_formatter = nil, -- Use default
|
||||
word_diff = false,
|
||||
use_internal_diff = true -- If luajit is present
|
||||
max_file_length = 40000,
|
||||
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user