feat: add undotree

This commit is contained in:
2025-05-06 09:16:53 +02:00
parent 0510ba6ddc
commit 0db31331c9
+20
View File
@@ -0,0 +1,20 @@
local function undo_tree_tab()
vim.cmd.tabnew()
vim.cmd.bprevious()
vim.cmd.UndotreeToggle()
vim.cmd.UndotreeFocus()
end
---@type LazyPluginSpec
return {
"mbbill/undotree",
keys = {
{ "<leader>uu", undo_tree_tab, mode = "n" },
},
init = function(_)
vim.g.undotree_WindowLayout = 2
vim.g.undotree_DiffCommand = "diff -u"
vim.g.undotree_SplitWidth = 50
vim.g.undotree_DiffpanelHeight = 20
end,
}