summaryrefslogtreecommitdiff
path: root/fnl/config/auto-session.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/config/auto-session.fnl')
-rw-r--r--fnl/config/auto-session.fnl20
1 files changed, 20 insertions, 0 deletions
diff --git a/fnl/config/auto-session.fnl b/fnl/config/auto-session.fnl
new file mode 100644
index 0000000..62e28b4
--- /dev/null
+++ b/fnl/config/auto-session.fnl
@@ -0,0 +1,20 @@
+;; Session manager.
+(module config.auto-session {autoload {: util}})
+
+(def- auto-opts {:log_level :info
+ :auto_session_enable_last_session false
+ :auto_session_root_dir (.. (vim.fn.stdpath :data) :/sessions/)
+ :auto_session_enabled true
+ :auto_save_enabled nil
+ :auto_restore_enabled nil
+ :auto_session_suppress_dirs [(os.getenv :HOME)]
+ :auto_session_use_git_branch nil
+ :bypass_session_save_file_types [:alpha]})
+
+(def- lens-opts {:path_display [:shorten]
+ :previewer false
+ :prompt_title :Sessions})
+
+(set vim.o.sessionoptions "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal")
+(util.use-config :session-lens lens-opts)
+(util.use-config :auto-session auto-opts)