finalconfig of modular
This commit is contained in:
parent
ad12ab12d4
commit
d6e72bd4c1
7 changed files with 0 additions and 0 deletions
|
|
@ -1,33 +0,0 @@
|
|||
--[plugins/gitsigns.lua]
|
||||
return {
|
||||
-- This table is merged with the main gitsigns definition in plugins/git.lua
|
||||
'lewis6991/gitsigns.nvim',
|
||||
opts = {
|
||||
on_attach = function(bufnr)
|
||||
local gs = package.loaded.gitsigns
|
||||
local function map(mode, l, r, desc)
|
||||
vim.keymap.set(mode, l, r, { buffer = bufnr, desc = desc })
|
||||
end
|
||||
|
||||
-- Navigation
|
||||
map('n', ']c', gs.next_hunk, 'Next Hunk')
|
||||
map('n', '[c', gs.prev_hunk, 'Prev Hunk')
|
||||
|
||||
-- Actions
|
||||
map({ 'n', 'v' }, '<leader>hs', gs.stage_hunk, 'Stage Hunk')
|
||||
map({ 'n', 'v' }, '<leader>hr', gs.reset_hunk, 'Reset Hunk')
|
||||
map('n', '<leader>hS', gs.stage_buffer, 'Stage Buffer')
|
||||
map('n', '<leader>hu', gs.undo_stage_hunk, 'Undo Stage Hunk')
|
||||
map('n', '<leader>hR', gs.reset_buffer, 'Reset Buffer')
|
||||
map('n', '<leader>hp', gs.preview_hunk, 'Preview Hunk')
|
||||
map('n', '<leader>hb', function() gs.blame_line { full = true } end, 'Blame Line')
|
||||
map('n', '<leader>tb', gs.toggle_current_line_blame, 'Toggle Blame Line')
|
||||
map('n', '<leader>hd', gs.diffthis, 'Diff This')
|
||||
map('n', '<leader>hD', function() gs.diffthis '~' end, 'Diff This ~')
|
||||
map('n', '<leader>td', gs.toggle_deleted, 'Toggle Deleted')
|
||||
|
||||
-- Text object
|
||||
map({ 'o', 'x' }, 'ih', ':<C-U>Gitsigns select_hunk<CR>', 'Select Hunk')
|
||||
end,
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue