mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-31 11:02:37 +00:00 
			
		
		
		
	completion/blink-cmp: option to enable friendly-snippets
Just adds it to the environment, `blink-cmp` will pick up on it automatically.
This commit is contained in:
		
					parent
					
						
							
								9e35fd8d02
							
						
					
				
			
			
				commit
				
					
						449b943b95
					
				
			
		
					 3 changed files with 7 additions and 2 deletions
				
			
		|  | @ -207,6 +207,9 @@ | |||
| - Add [direnv.vim](https://github.com/direnv/direnv.vim) plugin | ||||
|   for automatic syncing of nvim shell environment with direnv's. | ||||
| - Add [blink.cmp] source options and some default-disabled sources. | ||||
| - Add [blink.cmp] option to add | ||||
|   [friendly-snippets](https://github.com/rafamadriz/friendly-snippets) | ||||
|   so blink.cmp can source snippets from it. | ||||
| 
 | ||||
| [TheColorman](https://github.com/TheColorman) | ||||
| 
 | ||||
|  |  | |||
|  | @ -177,5 +177,7 @@ in { | |||
|           Attribute names must be source names used in {option}`vim.autocomplete.blink-cmp.setupOpts.sources.default`. | ||||
|         ''; | ||||
|       }; | ||||
| 
 | ||||
|     friendly-snippets.enable = mkEnableOption "friendly-snippets for blink to source from automatically"; | ||||
|   }; | ||||
| } | ||||
|  |  | |||
|  | @ -7,7 +7,7 @@ | |||
|   inherit (lib.strings) optionalString; | ||||
|   inherit (lib.generators) mkLuaInline; | ||||
|   inherit (lib.attrsets) attrValues filterAttrs; | ||||
|   inherit (lib.lists) map; | ||||
|   inherit (lib.lists) map optional; | ||||
|   inherit (lib.nvim.lua) toLuaObject; | ||||
|   inherit (builtins) concatStringsSep typeOf tryEval attrNames mapAttrs; | ||||
| 
 | ||||
|  | @ -26,7 +26,7 @@ | |||
|   blinkSourcePlugins = map (definition: definition.package) (attrValues enabledBlinkSources); | ||||
| in { | ||||
|   vim = mkIf cfg.enable { | ||||
|     startPlugins = ["blink-compat"] ++ blinkSourcePlugins; | ||||
|     startPlugins = ["blink-compat"] ++ blinkSourcePlugins ++ (optional cfg.friendly-snippets.enable "friendly-snippets"); | ||||
|     lazy.plugins = { | ||||
|       blink-cmp = { | ||||
|         package = "blink-cmp"; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 alfarel
				alfarel