diff --git a/lua/ow/plugins/undotree.lua b/lua/ow/plugins/undotree.lua new file mode 100644 index 0000000..8bad085 --- /dev/null +++ b/lua/ow/plugins/undotree.lua @@ -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 = { + { "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, +}