mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-31 02:52:37 +00:00 
			
		
		
		
	feat: add lib function to quickly mkIf bindings
This commit is contained in:
		
					parent
					
						
							
								ab8bb2fb5c
							
						
					
				
			
			
				commit
				
					
						a2eeb7333d
					
				
			
		
					 1 changed files with 17 additions and 0 deletions
				
			
		|  | @ -7,6 +7,23 @@ in | ||||||
|   nixpkgsLib.extend (self: super: { |   nixpkgsLib.extend (self: super: { | ||||||
|     nvim = mkNvimLib {lib = self;}; |     nvim = mkNvimLib {lib = self;}; | ||||||
| 
 | 
 | ||||||
|  |     mkLuaBinding = key: action: desc: | ||||||
|  |       self.mkIf (key != null) { | ||||||
|  |         "${key}" = { | ||||||
|  |           inherit action desc; | ||||||
|  |           lua = true; | ||||||
|  |           silent = true; | ||||||
|  |         }; | ||||||
|  |       }; | ||||||
|  | 
 | ||||||
|  |     mkBinding = key: action: desc: | ||||||
|  |       self.mkIf (key != null) { | ||||||
|  |         "${key}" = { | ||||||
|  |           inherit action desc; | ||||||
|  |           silent = true; | ||||||
|  |         }; | ||||||
|  |       }; | ||||||
|  | 
 | ||||||
|     # For forward compatibility. |     # For forward compatibility. | ||||||
|     literalExpression = super.literalExpression or super.literalExample; |     literalExpression = super.literalExpression or super.literalExample; | ||||||
|     literalDocBook = super.literalDocBook or super.literalExample; |     literalDocBook = super.literalDocBook or super.literalExample; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 n3oney
				n3oney