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.

17 lines
335 B

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