diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index bf2bda1..826f508 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -66,6 +66,7 @@ "telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" }, "telescope.nvim": { "branch": "master", "commit": "776b509f80dd49d8205b9b0d94485568236d1192" }, "twilight.nvim": { "branch": "main", "commit": "8bb7fa7b918baab1ca81b977102ddb54afa63512" }, + "undotree": { "branch": "main", "commit": "2685ce282702ab0b79c65916f352db2265b245dd" }, "vifm.vim": { "branch": "master", "commit": "a8130c37d144b51d84bee19f0532abcd3583383f" }, "vim-criticmarkup": { "branch": "master", "commit": "d15dc134eb177a170c79f6377f81eb02a9d20b02" }, "vim-easy-align": { "branch": "master", "commit": "0db4ea6132110631ec678a99a82aa49a0686ae65" }, diff --git a/nvim/.config/nvim/lua/core/mappings.lua b/nvim/.config/nvim/lua/core/mappings.lua index 40dd082..16e52da 100644 --- a/nvim/.config/nvim/lua/core/mappings.lua +++ b/nvim/.config/nvim/lua/core/mappings.lua @@ -284,3 +284,10 @@ map( 'lua require("colorizer").attach_to_buffer(0, {mode = "background"} )', { silent = true, desc = "colorize background" } ) + +-- PLUGIN: undotree +if is_available("undotree") then + map("n", "su", function() + require("undotree").toggle() + end, { silent = true, desc = "toggle undotree" }) +end diff --git a/nvim/.config/nvim/lua/plugins/ui.lua b/nvim/.config/nvim/lua/plugins/ui.lua index 1b156b0..bb0e19e 100644 --- a/nvim/.config/nvim/lua/plugins/ui.lua +++ b/nvim/.config/nvim/lua/plugins/ui.lua @@ -50,4 +50,11 @@ return { end, event = "VeryLazy", }, + { + "jiaoshijie/undotree", + dependencies = { + "nvim-lua/plenary.nvim", + }, + config = true, event = "VeryLazy", + }, }