nvim: modules: gitsigns: Update key map as per upstream changes

This commit is contained in:
Sanchayan Maity 2020-11-10 15:47:09 +05:30
parent 6b36e648d9
commit 07739669c5

View file

@ -7,13 +7,18 @@ require('gitsigns').setup {
changedelete = {hl = 'DiffChange', text = '~'},
},
keymaps = {
[']c'] = '<cmd>lua require("gitsigns").next_hunk()<CR>',
['[c'] = '<cmd>lua require("gitsigns").prev_hunk()<CR>',
['ghs'] = '<cmd>lua require("gitsigns").stage_hunk()<CR>',
['ghu'] = '<cmd>lua require("gitsigns").undo_stage_hunk()<CR>',
['ghr'] = '<cmd>lua require("gitsigns").reset_hunk()<CR>',
noremap = true,
buffer = true,
['n ]c'] = { expr = true, "&diff ? ']c' : '<cmd>lua require\"gitsigns\".next_hunk()<CR>'"},
['n [c'] = { expr = true, "&diff ? '[c' : '<cmd>lua require\"gitsigns\".prev_hunk()<CR>'"},
['n ghs'] = '<cmd>lua require"gitsigns".stage_hunk()<CR>',
['n ghu'] = '<cmd>lua require"gitsigns".undo_stage_hunk()<CR>',
['n ghr'] = '<cmd>lua require"gitsigns".reset_hunk()<CR>',
},
watch_index = {
interval = 1000
}
},
sign_priority = 6,
}