mirror of
				https://github.com/folke/lazy.nvim.git
				synced 2025-10-31 14:31:04 +00:00 
			
		
		
		
	feat(spec): allow git@ and http urls in Plugin[1] without url=. Fixes #357
		
	This commit is contained in:
		
					parent
					
						
							
								d813c518d5
							
						
					
				
			
			
				commit
				
					
						4304035ef4
					
				
			
		
					 2 changed files with 7 additions and 1 deletions
				
			
		|  | @ -52,7 +52,12 @@ function Spec:add(plugin, results, is_dep) | |||
|   end | ||||
| 
 | ||||
|   if not plugin.url and plugin[1] then | ||||
|     plugin.url = Config.options.git.url_format:format(plugin[1]) | ||||
|     local prefix = plugin[1]:sub(1, 4) | ||||
|     if prefix == "http" or prefix == "git@" then | ||||
|       plugin.url = plugin[1] | ||||
|     else | ||||
|       plugin.url = Config.options.git.url_format:format(plugin[1]) | ||||
|     end | ||||
|   end | ||||
| 
 | ||||
|   if plugin.dir then | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue