mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-31 11:02:37 +00:00 
			
		
		
		
	utility/yanky-nvim: fix plugin setupOpts; assert when shada is disabled
This commit is contained in:
		
					parent
					
						
							
								8eebd8c8a6
							
						
					
				
			
			
				commit
				
					
						831a5db8fa
					
				
			
		
					 2 changed files with 17 additions and 5 deletions
				
			
		|  | @ -11,6 +11,7 @@ | |||
| 
 | ||||
|   cfg = config.vim.utility.yanky-nvim; | ||||
|   usingSqlite = cfg.setupOpts.ring.storage == "sqlite"; | ||||
|   usingShada = cfg.setupOpts.ring.storage == "shada"; | ||||
| in { | ||||
|   config = mkIf cfg.enable { | ||||
|     vim = { | ||||
|  | @ -28,5 +29,15 @@ in { | |||
|         require("yanky").setup(${toLuaObject cfg.setupOpts}); | ||||
|       ''; | ||||
|     }; | ||||
| 
 | ||||
|     assertions = [ | ||||
|       { | ||||
|         assertion = usingShada && ((config.vim.options.shada or "") == ""); | ||||
|         message = '' | ||||
|           Yanky.nvim is configured to use 'shada' for the storage backend, but shada is disabled | ||||
|           in 'vim.options'. Please re-enable shada, or switch to a different backend. | ||||
|         ''; | ||||
|       } | ||||
|     ]; | ||||
|   }; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue