From 071081e9d8cadc91472096415ad205ba07871115 Mon Sep 17 00:00:00 2001 From: Oscar Wallberg Date: Tue, 14 Apr 2026 16:02:49 +0200 Subject: [PATCH] feat: add undotree --- init.lua | 1 + lua/plugins/undotree.lua | 6 +----- nvim-pack-lock.json | 4 ++++ 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index a244598..d8da5c3 100644 --- a/init.lua +++ b/init.lua @@ -41,6 +41,7 @@ require("pack").setup({ "https://github.com/nvim-tree/nvim-tree.lua", "https://github.com/stevearc/oil.nvim", "https://github.com/hedyhli/outline.nvim", + "https://github.com/jiaoshijie/undotree", { "https://github.com/tree-sitter/tree-sitter-bash", ts_parser = "bash", diff --git a/lua/plugins/undotree.lua b/lua/plugins/undotree.lua index f6af4e6..fcd9c8d 100644 --- a/lua/plugins/undotree.lua +++ b/lua/plugins/undotree.lua @@ -1,5 +1 @@ -vim.cmd.packadd("nvim.undotree") - -vim.keymap.set("n", "uu", function() - require("undotree").open({ command = "leftabove40vnew" }) -end) +vim.keymap.set("n", "u", require("undotree").toggle) diff --git a/nvim-pack-lock.json b/nvim-pack-lock.json index 9adca3f..6eafd27 100644 --- a/nvim-pack-lock.json +++ b/nvim-pack-lock.json @@ -142,6 +142,10 @@ "rev": "484e2889f3619b9da90c9b73a6f216a71947c09f", "src": "https://github.com/georgeharker/tree-sitter-zsh" }, + "undotree": { + "rev": "0e6d41d55ad147407e4ba00a292973de8db0b836", + "src": "https://github.com/jiaoshijie/undotree" + }, "vim-fugitive": { "rev": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0", "src": "https://github.com/tpope/vim-fugitive"