mirror of
				https://github.com/folke/lazy.nvim.git
				synced 2025-10-31 14:31:04 +00:00 
			
		
		
		
	[options] Properly handle dev.path as a function
This commit is contained in:
		
					parent
					
						
							
								d8f26efd45
							
						
					
				
			
			
				commit
				
					
						ae66638f72
					
				
			
		
					 2 changed files with 4 additions and 2 deletions
				
			
		|  | @ -679,7 +679,7 @@ will be added to the plugin’s spec. | |||
|       dev = { | ||||
|         -- Directory where you store your local plugin projects. If a function is used, | ||||
|         -- the plugin directory (e.g. `~/projects/plugin-name`) must be returned. | ||||
|         ---@type string | fun(plugin: LazyPlugin): string | ||||
|         ---@type string | fun(): string | ||||
|         path = "~/projects", | ||||
|         ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub | ||||
|         patterns = {}, -- For example {"folke"} | ||||
|  |  | |||
|  | @ -69,7 +69,7 @@ M.defaults = { | |||
|   dev = { | ||||
|     -- Directory where you store your local plugin projects. If a function is used, | ||||
|     -- the plugin directory (e.g. `~/projects/plugin-name`) must be returned. | ||||
|     ---@type string | fun(plugin: LazyPlugin): string | ||||
|     ---@type string | fun(): string | ||||
|     path = "~/projects", | ||||
|     ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub | ||||
|     patterns = {}, -- For example {"folke"} | ||||
|  | @ -286,6 +286,8 @@ function M.setup(opts) | |||
|   M.options.root = Util.norm(M.options.root) | ||||
|   if type(M.options.dev.path) == "string" then | ||||
|     M.options.dev.path = Util.norm(M.options.dev.path) | ||||
|   else | ||||
|     M.options.dev.path = Util.norm(M.options.dev.path()) | ||||
|   end | ||||
|   M.options.lockfile = Util.norm(M.options.lockfile) | ||||
|   M.options.readme.root = Util.norm(M.options.readme.root) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue