diff options
| author | Kyren223 <ulmliad223@gmail.com> | 2024-07-07 12:13:36 +0300 |
|---|---|---|
| committer | Kyren223 <ulmliad223@gmail.com> | 2024-07-07 12:13:36 +0300 |
| commit | 93c3ab5dc64ad6227c0e87d61cbdc5feaa390aa0 (patch) | |
| tree | d03574e7ef1ffb546ccfb828858f9658ae5ab64b /.config/nvim/lua | |
| parent | cba2316b8c5ff4ec15f5d7462196d1d63fa6bfae (diff) | |
Neovim: added undotree plugin, undos now persist to files
Diffstat (limited to '.config/nvim/lua')
| -rw-r--r-- | .config/nvim/lua/custom/plugins/utility.lua | 6 | ||||
| -rw-r--r-- | .config/nvim/lua/options.lua | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/.config/nvim/lua/custom/plugins/utility.lua b/.config/nvim/lua/custom/plugins/utility.lua index 53a8c06..2d2a93a 100644 --- a/.config/nvim/lua/custom/plugins/utility.lua +++ b/.config/nvim/lua/custom/plugins/utility.lua @@ -43,4 +43,10 @@ return { ft = 'lua', opts = { library = { { path = 'luvit-meta/library', words = { 'vim%.uv' } } } }, }, + { + 'mbbill/undotree', + config = function() + vim.keymap.set('n', '<leader>ut', vim.cmd.UndotreeToggle) + end, + }, } diff --git a/.config/nvim/lua/options.lua b/.config/nvim/lua/options.lua index 8fecc36..85153de 100644 --- a/.config/nvim/lua/options.lua +++ b/.config/nvim/lua/options.lua @@ -5,6 +5,7 @@ vim.g.maplocalleader = ' ' vim.g.have_nerd_font = true vim.opt.mouse = 'a' -- enable mouse vim.opt.clipboard = 'unnamedplus' -- use system clipboard +vim.opt.undofile = true -- Persist undo history by saving it to a file -- Tab vim.opt.expandtab = true -- convert tabs to spaces |
