return {
|
|
"mbbill/undotree",
|
|
event = "VeryLazy",
|
|
config = function()
|
|
if vim.fn.has("persistent_undo") == 0 then
|
|
return
|
|
end
|
|
|
|
local target_path = vim.fn.expand("~/.cache/nvim/undodir/")
|
|
|
|
if vim.fn.isdirectory(target_path) == 0 then
|
|
vim.fn.mkdir(target_path, "p", 0700)
|
|
end
|
|
|
|
vim.opt.undodir = target_path
|
|
vim.opt.undofile = true
|
|
end,
|
|
}
|