Update undotree.lua

This commit is contained in:
Rubin Bhandari 2024-05-31 20:05:15 +05:45 committed by GitHub
parent 0481c8fe10
commit 0ae6fd4de9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,18 +6,6 @@ return {
{ "<leader>uu", "<cmd>UndotreeToggle<cr>", desc = "Undo Tree Toggle" },
},
init = function()
-- Persist undo, refer https://github.com/mbbill/undotree#usage
local undodir = vim.fn.expand("~/.undo-nvim")
if vim.fn.has("persistent_undo") == 1 then
if vim.fn.isdirectory(undodir) == 0 then
os.execute("mkdir -p " .. undodir)
end
vim.opt.undodir = undodir
vim.opt.undofile = true
end
-- set layout style to 2, let g:undotree_WindowLayout = 2
vim.g.undotree_WindowLayout = 2
end,