aboutsummaryrefslogtreecommitdiff
path: root/fnl/opt.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/opt.fnl')
-rw-r--r--fnl/opt.fnl7
1 files changed, 7 insertions, 0 deletions
diff --git a/fnl/opt.fnl b/fnl/opt.fnl
index e28645c..8b8981c 100644
--- a/fnl/opt.fnl
+++ b/fnl/opt.fnl
@@ -11,3 +11,10 @@
(tset vim.opt :termguicolors true)
;--vim.opt.fillchars = { eob = ""}
(vim.cmd (.. "colorscheme " _G.settings.colorscheme))
+
+(when (= (vim.fn.has :persistent_undo) 1)
+ (local target_path (vim.fn.expand "~/.undodir"))
+ (when (not= (vim.fn.isdirectory target_path) 1)
+ (vim.fn.mkdir target_path :p 0777))
+ (tset vim.o :undodir target_path)
+ (tset vim.o :undofile true))