- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 54
Auto restore last session
This optional feature enables the keeping track and loading of the last session. The last session is only loaded at startup if there isn't already a session for the current working directory. This feature can come in handy when starting Neovim from a GUI for example.
require("auto-session").setup {
  auto_restore_last_session = true,
}A quick workaround for inability to auto create new sessions is to conditionally enable last session.
require("auto-session").setup {
  auto_restore_last_session = vim.loop.cwd() == vim.loop.os_homedir(),
}Now last session will be restored only when Neovim is launched in the home directory, which is usually right after launching the terminal or Neovim GUI clients.