mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-31 11:02:37 +00:00 
			
		
		
		
	Merge branch 'main' into live-docs-preview
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				Check for typos in the source tree / check-typos (push) Has been cancelled
				
			
		
		
	
	
		
	
		
			Some checks failed
		
		
	
	Check for typos in the source tree / check-typos (push) Has been cancelled
				
			This commit is contained in:
		
				commit
				
					
						fbe0d142e4
					
				
			
		
					 1 changed files with 18 additions and 13 deletions
				
			
		|  | @ -9,30 +9,35 @@ | |||
|   inherit (pkgs) vimPlugins; | ||||
|   inherit (lib.strings) isString; | ||||
|   inherit (lib.lists) filter map; | ||||
|   inherit (builtins) path; | ||||
| 
 | ||||
|   # alias to the internal configuration | ||||
|   vimOptions = config.vim; | ||||
| 
 | ||||
|   noBuildPlug = {pname, ...} @ attrs: let | ||||
|     src = inputs."plugin-${attrs.pname}"; | ||||
|   in | ||||
|     { | ||||
|       version = src.shortRev or src.shortDirtyRev or "dirty"; | ||||
|       outPath = src; | ||||
|       passthru.vimPlugin = false; | ||||
|     } | ||||
|     // attrs; | ||||
|   noBuildPlug = pname: let | ||||
|     input = inputs."plugin-${pname}"; | ||||
|     version = input.shortRev or input.shortDirtyRev or "dirty"; | ||||
|   in { | ||||
|     # vim.lazy.plugins relies on pname, so we only set that here | ||||
|     # version isn't needed for anything, but inherit it anyway for correctness | ||||
|     inherit pname version; | ||||
|     outPath = path { | ||||
|       name = "${pname}-0-unstable-${version}"; | ||||
|       path = input.outPath; | ||||
|     }; | ||||
|     passthru.vimPlugin = false; | ||||
|   }; | ||||
| 
 | ||||
|   # build a vim plugin with the given name and arguments | ||||
|   # if the plugin is nvim-treesitter, warn the user to use buildTreesitterPlug | ||||
|   # instead | ||||
|   buildPlug = attrs: let | ||||
|     src = inputs."plugin-${attrs.pname}"; | ||||
|     input = inputs."plugin-${attrs.pname}"; | ||||
|   in | ||||
|     pkgs.vimUtils.buildVimPlugin ( | ||||
|       { | ||||
|         version = src.shortRev or src.shortDirtyRev or "dirty"; | ||||
|         inherit src; | ||||
|         version = input.shortRev or input.shortDirtyRev or "dirty"; | ||||
|         src = input.outPath; | ||||
|       } | ||||
|       // attrs | ||||
|     ); | ||||
|  | @ -51,7 +56,7 @@ | |||
|     map ( | ||||
|       plug: | ||||
|         if (isString plug) | ||||
|         then pluginBuilders.${plug} or (noBuildPlug {pname = plug;}) | ||||
|         then pluginBuilders.${plug} or (noBuildPlug plug) | ||||
|         else plug | ||||
|     ) (filter (f: f != null) plugins); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 GitHub
					GitHub