summaryrefslogtreecommitdiff
path: root/fnl/config/auto-session.fnl
blob: 62e28b45fb48c9b8d4e8a66d19e50b483694e884 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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)