You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
359 B

  1. return {
  2. "mbbill/undotree",
  3. event = "VeryLazy",
  4. config = function()
  5. if vim.fn.has("persistent_undo") == 0 then
  6. return
  7. end
  8. local target_path = vim.fn.expand("~/.cache/nvim/undodir/")
  9. if vim.fn.isdirectory(target_path) == 0 then
  10. vim.fn.mkdir(target_path, "p", 0700)
  11. end
  12. vim.opt.undodir = target_path
  13. vim.opt.undofile = true
  14. end,
  15. }