Refactored nvim config to make it easier and less insanely nested
This commit is contained in:
20
.config/nvim/lua/plugins/diffview.lua
Normal file
20
.config/nvim/lua/plugins/diffview.lua
Normal 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,
|
||||
}
|
||||
Reference in New Issue
Block a user