vim/undotree: move keymap

This commit is contained in:
Fernando Schauenburg 2023-08-10 01:59:44 +02:00
parent ecf113f36b
commit 6648bd6fdd
2 changed files with 5 additions and 6 deletions

View file

@ -133,6 +133,10 @@ local keymap = {
{ '<leader>th', '<cmd>TSHighlightCapturesUnderCursor<cr>' }, { '<leader>th', '<cmd>TSHighlightCapturesUnderCursor<cr>' },
{ '<leader>tn', '<cmd>TSNodeUnderCursor<cr>' }, { '<leader>tn', '<cmd>TSNodeUnderCursor<cr>' },
}, },
undotree = {
{ '<leader>u', '<cmd>UndotreeToggle<cr>' },
},
} }
M.setup = function() M.setup = function()

View file

@ -1,6 +1,5 @@
return { return {
'mbbill/undotree', 'mbbill/undotree',
init = function() init = function()
vim.g.undotree_WindowLayout = 2 -- tree: left, diff: bottom vim.g.undotree_WindowLayout = 2 -- tree: left, diff: bottom
vim.g.undotree_DiffAutoOpen = 0 -- don't open diff by default vim.g.undotree_DiffAutoOpen = 0 -- don't open diff by default
@ -12,11 +11,7 @@ return {
vim.g.undotree_TreeSplitShape = '' vim.g.undotree_TreeSplitShape = ''
vim.g.undotree_TreeReturnShape = '' vim.g.undotree_TreeReturnShape = ''
end, end,
keys = require('fschauen.keymap').undotree,
config = false, config = false,
keys = {
{ '<leader>u', '<cmd>UndotreeToggle<cr>' },
},
} }