mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-31 11:02:37 +00:00 
			
		
		
		
	session/nvim-session-manager: fix autoload_mode type
Fixes `Error detected while processing VimEnter Autocommands for "*"` by using an enum type for "autoload_mode" instead of a string
This commit is contained in:
		
					parent
					
						
							
								f24189f1d2
							
						
					
				
			
			
				commit
				
					
						d12846211b
					
				
			
		
					 2 changed files with 8 additions and 0 deletions
				
			
		|  | @ -200,3 +200,8 @@ | ||||||
| [alfarel](https://github.com/alfarelcynthesis): | [alfarel](https://github.com/alfarelcynthesis): | ||||||
| 
 | 
 | ||||||
| - Add missing `yazi.nvim` dependency (`snacks.nvim`). | - Add missing `yazi.nvim` dependency (`snacks.nvim`). | ||||||
|  | 
 | ||||||
|  | [TheColorman](https://github.com/TheColorman) | ||||||
|  | 
 | ||||||
|  | - Fix plugin `setupOpts` for `neovim-session-manager` having an invalid value | ||||||
|  |   for `autoload_mode`. | ||||||
|  |  | ||||||
|  | @ -1,5 +1,6 @@ | ||||||
| {lib, ...}: let | {lib, ...}: let | ||||||
|   inherit (lib.types) nullOr str bool; |   inherit (lib.types) nullOr str bool; | ||||||
|  |   inherit (lib.generators) mkLuaInline; | ||||||
|   inherit (lib) mkEnableOption mkOption types mkRenamedOptionModule; |   inherit (lib) mkEnableOption mkOption types mkRenamedOptionModule; | ||||||
| in { | in { | ||||||
|   imports = let |   imports = let | ||||||
|  | @ -68,6 +69,8 @@ in { | ||||||
| 
 | 
 | ||||||
|       autoload_mode = mkOption { |       autoload_mode = mkOption { | ||||||
|         type = types.enum ["Disabled" "CurrentDir" "LastSession"]; |         type = types.enum ["Disabled" "CurrentDir" "LastSession"]; | ||||||
|  |         # variable `sm` referenced from ./config.nix | ||||||
|  |         apply = value: mkLuaInline "sm.AutoloadMode.${value}"; | ||||||
|         default = "LastSession"; |         default = "LastSession"; | ||||||
|         description = "Define what to do when Neovim is started without arguments. Possible values: Disabled, CurrentDir, LastSession"; |         description = "Define what to do when Neovim is started without arguments. Possible values: Disabled, CurrentDir, LastSession"; | ||||||
|       }; |       }; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 TheColorman
				TheColorman