Split the git.lua into 4 separate plugins

This commit is contained in:
Kyren223
2024-10-27 23:55:50 +02:00
parent b1d9342211
commit da53593646
5 changed files with 107 additions and 96 deletions

View File

@@ -0,0 +1,20 @@
return {
'sindrets/diffview.nvim',
cmd = { 'DiffviewOpen', 'DiffviewClose', 'DiffviewFileHistory' },
keys = {
{ '<leader>gd', '<cmd>DiffviewOpen<cr>' },
{ '<leader>gl', '<cmd>DiffviewFileHistory<cr>' },
},
opts = function()
local quit_keymap = { 'n', 'q', '<cmd>DiffviewClose<cr>', { desc = 'Quit the diffview' } }
return {
enhanced_diff_hl = true,
default = { winbar_info = true },
keymaps = {
view = { quit_keymap },
file_panel = { quit_keymap },
file_history_panel = { quit_keymap },
},
}
end,
}