diff options
Diffstat (limited to '.config/nvim/lua/autosession_conf.lua')
| -rw-r--r-- | .config/nvim/lua/autosession_conf.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/.config/nvim/lua/autosession_conf.lua b/.config/nvim/lua/autosession_conf.lua new file mode 100644 index 0000000..5c2a76d --- /dev/null +++ b/.config/nvim/lua/autosession_conf.lua @@ -0,0 +1,21 @@ +local opts = { + log_level = 'error', + auto_session_enable_last_session = false, + auto_session_root_dir = vim.fn.stdpath('data') .. "/sessions/", + auto_session_enabled = true, + auto_save_enabled = true, + auto_restore_enabled = true, + auto_session_suppress_dirs = { "~/", "~/Downloads", "/" }, + auto_session_use_git_branch = nil, + -- the configs below are lua only + bypass_session_save_file_types = nil, + cwd_change_handling = { -- table: Config for handling the DirChangePre and DirChanged autocmds, can be set to nil to disable altogether + restore_upcoming_session = true, -- boolean: restore session for upcoming cwd on cwd change + pre_cwd_changed_hook = nil, -- function: This is called after auto_session code runs for the `DirChangedPre` autocmd + post_cwd_changed_hook = nil, -- function: This is called after auto_session code runs for the `DirChanged` autocmd + }, +} + +vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions" + +require('auto-session').setup(opts) |
