diff --git a/config/nvim/lua/fschauen/keymap.lua b/config/nvim/lua/fschauen/keymap.lua index 6e5253e..3b6fd41 100644 --- a/config/nvim/lua/fschauen/keymap.lua +++ b/config/nvim/lua/fschauen/keymap.lua @@ -133,6 +133,10 @@ local keymap = { { 'th', 'TSHighlightCapturesUnderCursor' }, { 'tn', 'TSNodeUnderCursor' }, }, + + undotree = { + { 'u', 'UndotreeToggle' }, + }, } M.setup = function() diff --git a/config/nvim/lua/fschauen/plugins/undotree.lua b/config/nvim/lua/fschauen/plugins/undotree.lua index 50e3c4f..bd3f23c 100644 --- a/config/nvim/lua/fschauen/plugins/undotree.lua +++ b/config/nvim/lua/fschauen/plugins/undotree.lua @@ -1,6 +1,5 @@ return { 'mbbill/undotree', - init = function() vim.g.undotree_WindowLayout = 2 -- tree: left, diff: bottom vim.g.undotree_DiffAutoOpen = 0 -- don't open diff by default @@ -12,11 +11,7 @@ return { vim.g.undotree_TreeSplitShape = '╱' vim.g.undotree_TreeReturnShape = '╲' end, - + keys = require('fschauen.keymap').undotree, config = false, - - keys = { - { 'u', 'UndotreeToggle' }, - }, }