From b120c72e13b303c77288a0f0fff26f4704f90755 Mon Sep 17 00:00:00 2001 From: Cameron Ring Date: Sun, 15 Sep 2024 21:30:34 -0700 Subject: [PATCH] fix: #377 typo in last session config option --- lua/auto-session/config.lua | 4 ++-- lua/auto-session/init.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/auto-session/config.lua b/lua/auto-session/config.lua index 30bb350..3973609 100644 --- a/lua/auto-session/config.lua +++ b/lua/auto-session/config.lua @@ -14,7 +14,7 @@ local M = {} ---@field auto_create? boolean|function Enables/disables auto creating new session files. Can take a function that should return true/false if a new session file should be created or not ---@field suppressed_dirs? table Suppress auto session for directories ---@field allowed_dirs? table Allow auto session for directories, if empty then all directories are allowed except for suppressed ones ----@field auto_restore_last_lession? boolean On startup, loads the last saved session if session for cwd does not exist +---@field auto_restore_last_session? boolean On startup, loads the last saved session if session for cwd does not exist ---@field use_git_branch? boolean Include git branch name in session name to differentiate between sessions for different git branches ---@field lazy_support? boolean 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 used. Can be disabled if a problem is suspected or for debugging ---@field bypass_save_filetypes? table List of file types to bypass auto save when the only buffer open is one of the file types listed, useful to ignore dashboards @@ -159,7 +159,7 @@ local function check_old_config_names(config) auto_session_allowed_dirs = "allowed_dirs", auto_session_suppress_dirs = "suppressed_dirs", auto_session_create_enabled = "auto_create", - auto_session_enable_last_session = "auto_restore_last_lession", + auto_session_enable_last_session = "auto_restore_last_session", auto_session_use_git_branch = "use_git_branch", auto_restore_lazy_delay_enabled = "lazy_support", bypass_session_save_file_types = "bypass_save_filetypes", diff --git a/lua/auto-session/init.lua b/lua/auto-session/init.lua index abe1588..65fbed6 100644 --- a/lua/auto-session/init.lua +++ b/lua/auto-session/init.lua @@ -479,7 +479,7 @@ function AutoSession.auto_restore_session_at_vim_enter() end -- Check to see if the last session feature is on - if Config.auto_restore_last_lession then + if Config.auto_restore_last_session then Lib.logger.debug "Last session is enabled, checking for session" local last_session_name = Lib.get_latest_session(AutoSession.get_root_dir())