Skip to content

Latest commit

History

952 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

🗒️ AutoSession

Automatically reopen the files and windows you had open. It's like you never left!

demo

GitHub Actions Workflow Status

⭐ Features

  • 💾 Automatically save and restore sessions, with customizable filters
  • 🎯 Session picker, with support for Telescope, Snacks, Fzf-Lua, and vim.ui.select
  • 📁 Track directory changes
  • 🌿 Separate sessions per git branch
  • 🪝 Customizable with Hooks
  • 🗃️ Save custom data along with your session

💡 How it works

When you start nvim, AutoSession will try to restore a session for the current working directory (cwd) if it exists. If it does, it'll reopen all of your buffers and windows. If not, nothing happens. When you quit nvim, AutoSession will automatically save a session for cwd so you can pick up where you left off.

📦 Installation

Lazy.nvim:

return {
"rmagatti/auto-session",
lazy=false,
---enables autocomplete for opts---@module"auto-session"---@typeAutoSession.Configopts= {
suppressed_dirs= { "~/", "~/Projects", "~/Downloads", "/" },
-- log_level = 'debug',
},
}

Note: For other plugin managers, make sure setup is called somewhere, e.g.:

require("auto-session").setup({})

⚙️ Configuration

Default settings (you don't have to copy these into your config):

localdefaults= {
-- Saving / restoringenabled=true, -- Enables/disables auto creating, saving and restoringauto_save=true, -- Enables/disables auto saving session on exitauto_restore=true, -- Enables/disables auto restoring session on startauto_create=true, -- Enables/disables auto creating new session files. Can be a function that returns true if a new session file should be allowedauto_restore_last_session=false, -- On startup, loads the last saved session if session for cwd does not existcwd_change_handling=false, -- Automatically save/restore sessions when changing directoriessingle_session_mode=false, -- Enable single session mode to keep all work in one session regardless of cwd changes. When enabled, prevents creation of separate sessions for different directories and maintains one unified session. Does not work with cwd_change_handling-- Filteringsuppressed_dirs=nil, -- Suppress session restore/create in certain directoriesallowed_dirs=nil, -- Allow session restore/create in certain directoriesbypass_save_filetypes=nil, -- List of filetypes to bypass auto save when the only buffer open is one of the file types listed, useful to ignore dashboardsclose_filetypes_on_save= { "checkhealth" }, -- Buffers with matching filetypes will be closed before savingclose_unsupported_windows=true, -- Close windows that aren't backed by normal file before autosaving a session. Set preserve_filetypes/preserve_buftypes to keep selected unsupported windows open.preserve_buffer_on_restore=nil, -- Function that returns true if a buffer should be preserved when restoring a session-- Git / Session naminggit_use_branch_name=false, -- Include git branch name in session name, can also be a function that takes an optional path and returns the name of the branchgit_auto_restore_on_branch_change=false, -- Should we auto-restore the session when the git branch changes. Requires git_use_branch_namecustom_session_tag=nil, -- Function that can return a string to be used as part of the session nameresolve_symlinks=false, -- Resolve symlinks in cwd and single-directory launch arguments before saving/restoring sessions-- Deletingauto_delete_empty_sessions=true, -- Enables/disables deleting the session if there are only unnamed/empty buffers when auto-savingpurge_after_minutes=nil, -- Sessions older than purge_after_minutes will be deleted asynchronously on startup, e.g. set to 14400 to delete sessions that haven't been accessed for more than 10 days, defaults to off (no purging), requires >= nvim 0.10-- Saving extra datasave_extra_data=nil, -- Function that returns extra data that should be saved with the session. Will be passed to restore_extra_data on restorerestore_extra_data=nil, -- Function called when there's extra data saved for a session-- Argument handlingargs_allow_single_directory=true, -- Follow normal session restore/save logic if launched with a single directory as the only argument. Set to false to skip auto-restore when any argument is passed to Neovimargs_allow_files_auto_save=false, -- Allow saving a session even when launched with a file argument (or multiple files/dirs). It does not re-enable auto-restore and can be true or a function that returns true when saving is allowed. See documentation for more detail-- Misclog_level="error", -- Sets the log level of the plugin (debug, info, warn, error).root_dir=vim.fn.stdpath("data") .."/sessions/", -- Root dir where sessions will be storedshow_auto_restore_notif=false, -- Whether to show a notification when auto-restoringrestore_error_handler=nil, -- Function called when there's an error restoring. By default, it ignores fold and help errors otherwise it displays the error and returns false to disable auto_save. Default handler is accessible as require('auto-session').default_restore_error_handlercontinue_restore_on_error=true, -- Keep loading the session even if there's an errorlsp_stop_on_restore=false, -- Should language servers be stopped when restoring a session. Can also be a function that will be called if set. Not called on autorestore from startuplazy_support=true, -- Automatically detect if Lazy.nvim is being used and wait until Lazy is done to make sure session is restored correctly. Does nothing if Lazy isn't being usedlegacy_cmds=true, -- Define legacy commands: Session*, Autosession (lowercase s), currently true. Set to false to prevent defining them---@typeSessionLenssession_lens= {
picker=nil, -- "telescope"|"snacks"|"fzf"|"select"|nil Pickers are detected automatically but you can also set one manually. Falls back to vim.ui.selectload_on_setup=true, -- Only used for telescope, registers the telescope extension at startup so you can use :Telescope session-lenspicker_opts=nil, -- Table passed to Telescope / Snacks / Fzf-Lua to configure the picker. See below for more informationpreviewer="summary", -- 'summary'|'active_buffer'|function - How to display session preview. 'summary' shows a summary of the session, 'active_buffer' shows the contents of the active buffer in the session, or a custom functionshorten_paths=true, -- Replace the home directory with ~ in the picker display names---@typeSessionLensMappingsmappings= {
-- Mode can be a string or a table, e.g. {"i", "n"} for both insert and normal modedelete_session= { "i", "<C-d>" }, -- mode and key for deleting a session from the pickeralternate_session= { "i", "<C-s>" }, -- mode and key for swapping to alternate session from the pickercopy_session= { "i", "<C-y>" }, -- mode and key for copying a session from the picker
},
---@typeSessionControlsession_control= {
control_dir=vim.fn.stdpath("data") .."/auto_session/", -- Auto session control dir, for control files, like alternating between two sessions with session-lenscontrol_filename="session_control.json", -- File name of the session control file
},
},
}
Types
---@classAutoSession.Config------Saving / restoring---@fieldenabled? boolean---@fieldauto_save? boolean---@fieldauto_restore? boolean---@fieldauto_create? boolean|fun(): should_create_session:boolean---@fieldauto_restore_last_session? boolean---@fieldcwd_change_handling? boolean---@fieldsingle_session_mode? boolean------Filtering---@fieldsuppressed_dirs? table---@fieldallowed_dirs? table---@fieldbypass_save_filetypes? table---@fieldclose_filetypes_on_save? table---@fieldclose_unsupported_windows? boolean|AutoSession.CloseUnsupportedWindowsOpts---@fieldpreserve_buffer_on_restore? fun(bufnr:number): preserve_buffer:boolean------Git / Session naming---@fieldgit_use_branch_name? boolean|fun(path:string?): branch_name:string|nil---@fieldgit_auto_restore_on_branch_change? boolean---@fieldcustom_session_tag? fun(session_name:string): tag:string---@fieldresolve_symlinks? boolean------Deleting---@fieldauto_delete_empty_sessions? boolean---@fieldpurge_after_minutes? number------Saving extra data---@fieldsave_extra_data? fun(session_name:string): extra_data:string|nil---@fieldrestore_extra_data? fun(session_name:string, extra_data:string)------Argument handling---@fieldargs_allow_single_directory? boolean---@fieldargs_allow_files_auto_save? boolean|fun(): disable_auto_save:boolean------Misc---@fieldlog_level? string|integer---@fieldroot_dir? string---@fieldshow_auto_restore_notif? boolean---@fieldrestore_error_handler? fun(error_msg:string): disable_auto_save:boolean---@fieldcontinue_restore_on_error? boolean---@fieldlsp_stop_on_restore? boolean|fun()---@fieldlazy_support? boolean---@fieldlegacy_cmds? boolean------@fieldsession_lens? SessionLens------Session Lens Config---@classSessionLens---@fieldpicker? "telescope"|"snacks"|"fzf"|"select"---@fieldload_on_setup? boolean---@fieldpicker_opts? table---@fieldpreviewer? 'summary'|'active_buffer'|fun(session_name:string, session_filename:string, session_lines:string[]):lines:string[],filetype:string?---@fieldshorten_paths? boolean---@fieldmappings? SessionLensMappings---@fieldsession_control? SessionControl------@classSessionLensMappings---@fielddelete_session? table---@fieldalternate_session? table---@fieldcopy_session? table------@classSessionControl---@fieldcontrol_dir? string---@fieldcontrol_filename? string------Hooks---@fieldpre_save_cmds? (string|fun(session_name:string): boolean)[] executes before a session is saved, return false to stop auto-saving---@fieldpost_save_cmds? (string|fun(session_name:string))[] executes after a session is saved---@fieldpre_restore_cmds? (string|fun(session_name:string): boolean)[] executes before a session is restored, return false to stop auto-restoring---@fieldpost_restore_cmds? (string|fun(session_name:string))[] executes after a session is restored---@fieldpre_delete_cmds? (string|fun(session_name:string))[] executes before a session is deleted---@fieldpost_delete_cmds? (string|fun(session_name:string))[] executes after a session is deleted---@fieldno_restore_cmds? (string|fun(is_startup:boolean))[] executes when no session is restored when auto-restoring, happens on startup or possibly on cwd/git branch changes---@fieldpre_cwd_changed_cmds? (string|fun())[] executes before cwd is changed if cwd_change_handling is true---@fieldpost_cwd_changed_cmds? (string|fun())[] executes after cwd is changed if cwd_change_handling is true---@fieldsave_extra_cmds? (string|fun(session_name:string): string|table|nil)[] executes to get extra data to save with the session

Recommended sessionoptions config

For the best experience, set sessionoptions to:

Lua

vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"

VimL

setsessionoptions+=winpos,terminal,folds

📢 Commands

:AutoSession save" saves a session based on the `cwd` in `root_dir`
:AutoSession save my_session" saves a session called `my_session` in `root_dir`
:AutoSession restore" restores a session based on the `cwd` from `root_dir`
:AutoSession restore my_session" restores `my_session` from `root_dir`
:AutoSession delete" deletes a session based on the `cwd` from `root_dir`
:AutoSession delete my_session" deletes `my_session` from `root_dir`
:AutoSession disable" disables autosave
:AutoSession enable" enables autosave (still does all checks in the config)
:AutoSession toggle" toggles autosave
:AutoSession purgeOrphaned" removes all orphaned sessions with no working directory left.
:AutoSession search" opens a session picker, see Config.session_lens.picker
:AutoSession deletePicker" opens a vim.ui.select picker to choose a session to delete.

📖 Details

Starting nvim

  • When starting nvim with no arguments, AutoSession will try to restore the session for cwd if one exists.
  • When starting nvim . (or another directory), AutoSession will try to restore the session for that directory. See argument handling for more details.
  • When starting nvim some_file.txt (or multiple files), by default, AutoSession won't do anything. See argument handling for more details.
  • Set args_allow_single_directory = false if you want startup restore to be skipped whenever any command-line argument is passed. args_allow_files_auto_save still only controls whether autosave is allowed for file or mixed arguments.
  • Even after starting nvim with a file argument, a session for cwd can still be manually restored by running :AutoSession restore.
  • When piping to nvim, e.g: cat myfile | nvim, AutoSession disables itself.

⚠️ Please note that if there are errors in your config, restoring the session might fail, if that happens, auto session will then disable auto saving for the current session.

Exiting nvim

  • When you exit, AutoSession will try to automatically save a session for cwd
  • If autosaving is enabled (auto_save = true) and
  • If there are non-empty buffers and
  • If cwd isn't in suppressed_dirs or, if set, it is in allowed_dirs and
  • If the session doesn't exist and auto_create = true
  • Then it will save a session for cwd

Session naming:

  • By default, sessions are named for cwd
  • You can manually name a session with :AutoSession save my_session. Manually named sessions can't be auto-restored but once restored they will be used for autosaving.
  • The current git branch can optionally be included in the session name.
  • You can also set a custom function that returns a string to include in the session name so you have different sessions for cwd per tmux session, window, etc.

🔭 Session Picker

You can use Telescope, snacks.nvim, Fzf-Lua to see, load, and delete your sessions. The configuration options are in the session_lens section:

return {
"rmagatti/auto-session",
lazy=false,
keys= {
-- Will use Telescope if installed or a vim.ui.select picker otherwise
{ "<leader>wr", "<cmd>AutoSession search<CR>", desc="Session search" },
{ "<leader>ws", "<cmd>AutoSession save<CR>", desc="Save session" },
{ "<leader>wa", "<cmd>AutoSession toggle<CR>", desc="Toggle autosave" },
},
---enables autocomplete for opts---@module"auto-session"---@typeAutoSession.Configopts= {
-- The following are already the default values, no need to provide them if these are already the settings you want.session_lens= {
picker=nil, -- "telescope"|"snacks"|"fzf"|"select"|nil Pickers are detected automatically but you can also manually choose one. Falls back to vim.ui.selectmappings= {
-- Mode can be a string or a table, e.g. {"i", "n"} for both insert and normal modedelete_session= { "i", "<C-d>" },
alternate_session= { "i", "<C-s>" },
copy_session= { "i", "<C-y>" },
},
picker_opts= {
-- For Telescope, you can set theme options here, see:-- https://github.com/nvim-telescope/telescope.nvim/blob/master/doc/telescope.txt#L112-- https://github.com/nvim-telescope/telescope.nvim/blob/master/lua/telescope/themes.lua---- border = true,-- layout_config = {-- width = 0.8, -- Can set width and height as percent of window-- height = 0.5,-- },-- For Snacks, you can set layout options here, see:-- https://github.com/folke/snacks.nvim/blob/main/docs/picker.md#%EF%B8%8F-layouts---- preset = "dropdown",-- preview = false,-- layout = {-- width = 0.4,-- height = 0.4,-- },-- For Fzf-Lua, picker_opts just turns into winopts, see:-- https://github.com/ibhagwan/fzf-lua#customization---- height = 0.8,-- width = 0.50,
},
-- Telescope only: If load_on_setup is false, make sure you use `:AutoSession search` to open the picker as it will initialize everything firstload_on_setup=true,
},
},
}

Use :AutoSession search to launch the session picker. It will automatically look for Telescope, Snacks, and Fzf-Lua and use the first one it finds. If you have multiple pickers installed, you can set session-lens.picker to manually pick your picker. If no pickers are installed, it'll fall back to vim.ui.select

If you're using Telescope and want to launch the picker via :Telescope session-lens, set session-lens.load_on_setup = true or make sure you've called :AutoSession search first.

The following default keymaps are available when the session-lens picker is open:

  • <CR> loads the currently highlighted session.
  • <C-s> swaps to the previously opened session. This can give you a nice flow if you're constantly switching between two projects.
  • <C-d> will delete the currently highlighted session. This makes it easy to keep the session list clean.
  • <C-y> will let you make a copy of the highlighted session.

When using Telescope, Snacks, or Fzf-Lua, you can customize the picker using picker_opts. Refer to the links above for the specific picker configuration options.

picker

📁 Directories

There are two config options, allowed_dirs and suppressed_dirs, that control which directories AutoSession will auto-save a session for. If allowed_dirs is set, sessions will only be auto-saved in matching directories. If suppressed_dirs is set, then a session won't be auto-saved for a matching directory. If both are set, a session will only be auto-saved if it matches an allowed dir and does not match a suppressed dir.

Both options are a table of directories, with support for glob patterns:

opts= {
allowed_dirs= { "/some/dir/", "/projects/*", "~/work/**" },
suppressed_dirs= { "/projects/secret" },
}

Glob Pattern Syntax

  • * - Matches any characters in a single directory level (does not match /)
    • Example: /projects/* matches /projects/foo but NOT /projects/foo/bar
  • ** - Matches any characters including directory separators (matches across multiple levels)
    • Example: /projects/** matches /projects/foo, /projects/foo/bar, /projects/foo/bar/baz, etc.
  • ? - Matches exactly one character (excluding /)
    • Example: /project? matches /project1 or /projecta but not /project12
  • ~ - Expands to your home directory
    • Example: ~/.config/* matches any direct child of your .config directory

Examples

With the options above:

  • ✅ Sessions auto-save in /some/dir (exact match)
  • ✅ Sessions auto-save in /projects/myproject (matches /projects/*)
  • ❌ Sessions do NOT auto-save in /projects/myproject/submodule (too deep for /projects/*)
  • ✅ Sessions auto-save in ~/work/client/project/src (matches ~/work/**)
  • ❌ Sessions do NOT auto-save in /projects/secret (suppressed)

If you want even more fine-grained control, you can instead set auto_create to a function to conditionally create a session.

🚶 Directory changes

AutoSession can track cwd changes!

It's disabled by default, but when enabled it works as follows:

  • DirChangedPre (before the cwd actually changes):
    • Save the current session
    • Clear all buffers %bw!. This guarantees buffers don't bleed to the next session.
    • Clear jumps. Also done so there is no bleeding between sessions.
    • Run the pre_cwd_changed hook
  • DirChanged (after the cwd has changed):
    • Restore session using new cwd
    • Run the post_cwd_changed hook

Now when you changes the cwd with :cd some/new/dir AutoSession handles it gracefully, saving the current session so there aren't losses and loading the session for the upcoming cwd if it exists.

Hooks are available for custom actions before and after the cwd is changed. Here's the config for tracking cwd and a hook example:

opts= {
cwd_change_handling=true,
pre_cwd_changed_cmds= {
"tabdo NERDTreeClose", -- Close NERDTree before saving session
},
post_cwd_changed_cmds= {
function()
require("lualine").refresh() -- example refreshing the lualine status line _after_ the cwd changesend,
},
}

🌿 Git

To include the current git branch in the session name, set git_use_branch_name = true, in your config

AutoSession can also optionally auto-restore sessions when switching branches. Set git_auto_restore_on_branch_change = true, to enable that. Note, if you have modified files open when the branch is switched, AutoSession will ask if you want to close those files and restore the session or cancel restoring the session. If you cancel restoring the session, auto-saving will be disabled.

opts= {
git_use_branch_name=true,
git_auto_restore_on_branch_change=true,
}

🖥️ Dashboards

If you use a dashboard, you probably don't want to try and save a session when just the dashboard is open. To avoid that, add your dashboard filetype to the bypass list as follows:

opts= {
bypass_save_filetypes= { "alpha", "dashboard", "snacks_dashboard" }, -- or whatever dashboard you use
}

➖ Statusline

You can show the current session name in the statusline by using the function current_session_name(). With no arguments, it will return the full session name. For automatically created sessions that will be the path where the session was saved. If you only want the last directory in the path, you can call current_session_name(true).

Here's an example using Lualine:

require("lualine").setup({
options= {
theme="tokyonight",
},
sections= {
lualine_x= {
function()
returnrequire("auto-session.lib").current_session_name(true)
end,
},
},
})
Screenshot 2025-08-21 at 12 10 10

🪝 Command Hooks

Command hooks are a list of commands or functions that get executed at different stages of the session management lifecycle.

Command hooks exist in the format: {hook_name}

  • {pre_save}: executes before a session is saved, return false to stop auto-save
  • {post_save}: executes after a session is saved
  • {pre_restore}: executes before a session is restored, return false to stop auto-restore
  • {post_restore}: executes after a session is restored
  • {pre_delete}: executes before a session is deleted
  • {post_delete}: executes after a session is deleted
  • {no_restore}: executes when no session is auto-restored, happens afterVimEnter (and possibly on cwd/git branch change, if enabled)
  • {pre_cwd_changed}: executes before a directory is changed (if cwd_change_handling is enabled)
  • {post_cwd_changed}: executes after a directory is changed (if cwd_change_handling is enabled)
  • {save_extra}: executes after a session is saved, saves returned string or table to *x.vim, reference :help mks

Note that returning false from {pre_save}/{pre_restore} only prevents an automatic save/restore on exit/startup. It does not cancel an explicitly invoked command like :AutoSession save or :AutoSession restore.

Before reaching for these hooks to skip saving or restoring, check whether one of AutoSession's built-in options already handles the case declaratively: bypass_save_filetypes (e.g. skip saving dashboard-only sessions), suppressed_dirs/allowed_dirs (directory filtering), auto_delete_empty_sessions (empty sessions) and close_filetypes_on_save (buffers that shouldn't end up in the session). The cancellation hooks are best reserved for dynamic or project-specific conditions that can't be expressed through those options.

Each hook is a table of vim commands or lua functions (or a mix of both). Here are some examples of what you can do:

opts= {
-- {hook_name}_cmds = {"{hook_command1}", "{hook_command2}"}pre_save_cmds= {
"tabdo NERDTreeClose", -- Close NERDTree before saving sessionfunction(session_name)
ifsome_test() then-- don't auto-save if some_test() is truereturnfalseendend,
},
pre_restore_cmds= {
function(session_name)
ifsome_test() then-- don't auto-restore if some_test() is truereturnfalseendend,
},
post_restore_cmds= {
"someOtherVimCommand",
function()
-- Restore nvim-tree after a session is restoredlocalnvim_tree_api=require("nvim-tree.api")
nvim_tree_api.tree.open()
nvim_tree_api.tree.change_root(vim.fn.getcwd())
nvim_tree_api.tree.reload()
end,
},
-- Save quickfix list and open it when restoring the sessionclose_unsupported_windows= {
preserve_buftypes= { "quickfix" },
},
save_extra_cmds= {
function()
localqflist=vim.fn.getqflist()
-- return nil to clear any old qflistif#qflist==0thenreturnnilendlocalqfinfo=vim.fn.getqflist({ title=1 })
for_, entryinipairs(qflist) do-- use filename instead of bufnr so it can be reloaded. Entries with no-- buffer (e.g. non-error lines from build output) have bufnr 0, which-- would otherwise resolve to the current buffer, so leave them filelesslocalbufnr=entry.bufnriftype(bufnr) =="number" andbufnr>0andvim.api.nvim_buf_is_valid(bufnr) thenlocalfilename=vim.api.nvim_buf_get_name(bufnr)
iffilename~="" thenentry.filename=filenameendendentry.bufnr=nilendlocalsetqflist="call setqflist(" ..vim.fn.string(qflist) ..")"localsetqfinfo='call setqflist([], "a", ' ..vim.fn.string(qfinfo) ..")"return { setqflist, setqfinfo, "copen" }
end,
},
}

🗃️ Saving custom data

You can use the config functions save_extra_data and restore_extra_data to save arbitrary data as part of your session.

As an example, here's how you could save DAP breakpoints with your session:

---@module"auto-session"---@typeAutoSession.Configlocalopts= {
save_extra_data=function(_)
localok, breakpoints=pcall(require, "dap.breakpoints")
ifnotokornotbreakpointsthenreturnendlocalbps= {}
localbreakpoints_by_buf=breakpoints.get()
forbuf, buf_bpsinpairs(breakpoints_by_buf) dobps[vim.api.nvim_buf_get_name(buf)] =buf_bpsendifvim.tbl_isempty(bps) thenreturnendlocalextra_data= {
breakpoints=bps,
}
returnvim.fn.json_encode(extra_data)
end,
restore_extra_data=function(_, extra_data)
localjson=vim.fn.json_decode(extra_data)
ifjson.breakpointsthenlocalok, breakpoints=pcall(require, "dap.breakpoints")
ifnotokornotbreakpointsthenreturnendvim.notify("restoring breakpoints")
forbuf_name, buf_bpsinpairs(json.breakpoints) dofor_, bpinpairs(buf_bps) dolocalline=bp.linelocalopts= {
condition=bp.condition,
log_message=bp.logMessage,
hit_condition=bp.hitCondition,
}
localbufnr=vim.fn.bufnr(buf_name, true)
ifvim.fn.bufloaded(bufnr) ==0thenvim.api.nvim_buf_call(bufnr, vim.cmd.edit)
endbreakpoints.set(opts, bufnr, line)
endendendend,
}

📚 Wiki

See the wiki for more advanced ways to use AutoSession. And feel free to share new and interesting ways you're using AutoSession!

🚫 Disabling the plugin

You might run into issues with Firenvim or another plugin and want to disable AutoSession altogether based on some condition. For example, this will disable AutoSession when started under Firenvim:

return {
"rmagatti/auto-session",
lazy=false,
cond=notvim.g.started_by_firenvimandnotvim.g.vscode,
}

Or in VimScript:

ifexists('g:started_by_firenvim')
letg:auto_session_enabled=v:falseendif

You can also disable the plugin by setting the auto_session_enabled option to false at startup:

nvim --cmd "let g:auto_session_enabled = v:false"

🚧 Troubleshooting

First run :checkhealth auto-session to see if it detects any problems.

If that doesn't help, you can:

Compatibility

Neovim >= 0.10

For support < 0.10, use tag pre-nvim-0.10

Tested with:

v0.10.3 - nightly

About

A small automated session manager for Neovim

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages