mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-31 02:52:37 +00:00 
			
		
		
		
	wrapper/rc: loop over removed runtime paths
Would be neat to expose removed paths as a list in the future
This commit is contained in:
		
					parent
					
						
							
								2680be20a3
							
						
					
				
			
			
				commit
				
					
						4b868d0de6
					
				
			
		
					 1 changed files with 22 additions and 7 deletions
				
			
		|  | @ -49,8 +49,17 @@ in { | ||||||
|       default = []; |       default = []; | ||||||
|       example = literalExpression '' |       example = literalExpression '' | ||||||
|         [ |         [ | ||||||
|           "$HOME/.config/nvim-extra" # absolute path, as a string - impure |           # absolute path, as a string - impure | ||||||
|           ./nvim # relative path, as a path - pure |           "$HOME/.config/nvim-extra" | ||||||
|  | 
 | ||||||
|  |           # relative path, as a path - pure | ||||||
|  |           ./nvim | ||||||
|  | 
 | ||||||
|  |           # source type path - pure and reproducible | ||||||
|  |           (builtins.source { | ||||||
|  |             path = ./runtime; | ||||||
|  |             name = "nvim-runtime"; | ||||||
|  |           }) | ||||||
|         ] |         ] | ||||||
|       ''; |       ''; | ||||||
| 
 | 
 | ||||||
|  | @ -124,9 +133,15 @@ in { | ||||||
|           -- Remove default user runtime paths from the |           -- Remove default user runtime paths from the | ||||||
|           -- `runtimepath` option to avoid leaking user configuration |           -- `runtimepath` option to avoid leaking user configuration | ||||||
|           -- into the final neovim wrapper |           -- into the final neovim wrapper | ||||||
|           vim.opt.runtimepath:remove(vim.fn.stdpath('config'))              -- $HOME/.config/nvim |           local defaultRuntimePaths = { | ||||||
|           vim.opt.runtimepath:remove(vim.fn.stdpath('config') .. "/after")  -- $HOME/.config/nvim/after |             vim.fn.stdpath('config'),              -- $HOME/.config/nvim | ||||||
|           vim.opt.runtimepath:remove(vim.fn.stdpath('data') .. "/site")     -- $HOME/.local/share/nvim/site |             vim.fn.stdpath('config') .. "/after",  -- $HOME/.config/nvim/after | ||||||
|  |             vim.fn.stdpath('data') .. "/site",     -- $HOME/.local/share/nvim/site | ||||||
|  |           } | ||||||
|  | 
 | ||||||
|  |           for _, path in ipairs(defaultRuntimePaths) do | ||||||
|  |             vim.opt.runtimepath:remove(path) | ||||||
|  |           end | ||||||
|         ''} |         ''} | ||||||
| 
 | 
 | ||||||
|         ${optionalString cfg.enableLuaLoader "vim.loader.enable()"} |         ${optionalString cfg.enableLuaLoader "vim.loader.enable()"} | ||||||
|  | @ -134,9 +149,9 @@ in { | ||||||
| 
 | 
 | ||||||
|       defaultText = literalMD '' |       defaultText = literalMD '' | ||||||
|         By default, this option will **append** paths in |         By default, this option will **append** paths in | ||||||
|         [vim.additionalRuntimePaths](#opt-vim.additionalRuntimePaths) |         [](#opt-vim.additionalRuntimePaths) | ||||||
|         to the `runtimepath` and enable the experimental Lua module loader |         to the `runtimepath` and enable the experimental Lua module loader | ||||||
|         if [vim.enableLuaLoader](#opt-vim.enableLuaLoader) is set to true. |         if [](#opt-vim.enableLuaLoader) is set to true. | ||||||
|       ''; |       ''; | ||||||
| 
 | 
 | ||||||
|       example = literalExpression ''"$${builtins.readFile ./my-lua-config-pre.lua}"''; |       example = literalExpression ''"$${builtins.readFile ./my-lua-config-pre.lua}"''; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue