plugins, keymaps + fix formatting
This commit is contained in:
parent
ec6733a0ea
commit
b402f79541
10 changed files with 220 additions and 43 deletions
32
lua/custom/plugins/undotree.lua
Normal file
32
lua/custom/plugins/undotree.lua
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
local M = {
|
||||
'jiaoshijie/undotree',
|
||||
dependencies = 'nvim-lua/plenary.nvim',
|
||||
config = true,
|
||||
keys = { -- load the plugin only when using it's keybinding:
|
||||
{ '<leader>u', "<cmd>lua require('undotree').toggle()<cr>" },
|
||||
},
|
||||
}
|
||||
|
||||
function M.config()
|
||||
require('undotree').setup({
|
||||
float_diff = true, -- using float window previews diff, set this `true` will disable layout option
|
||||
layout = 'left_bottom', -- "left_bottom", "left_left_bottom"
|
||||
position = 'left', -- "right", "bottom"
|
||||
ignore_filetype = { 'NvimTree', 'fugitive', 'undotree', 'undotreeDiff', 'qf', 'TelescopePrompt', 'spectre_panel', 'tsplayground' },
|
||||
window = {
|
||||
winblend = 30,
|
||||
},
|
||||
keymaps = {
|
||||
['j'] = 'move_next',
|
||||
['k'] = 'move_prev',
|
||||
['gj'] = 'move2parent',
|
||||
['J'] = 'move_change_next',
|
||||
['K'] = 'move_change_prev',
|
||||
['<cr>'] = 'action_enter',
|
||||
['p'] = 'enter_diffbuf',
|
||||
['q'] = 'quit',
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
return M
|
||||
Loading…
Add table
Add a link
Reference in a new issue