mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	fix(lsp): don't start additional client if attach failed (#28744)
If a client for a server was already running and lsp.start was called in an unloaded buffer it started another client instead of bailing out.
This commit is contained in:
		 Mathias Fußenegger
					Mathias Fußenegger
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							6a264e0897
						
					
				
				
					commit
					5eee633c97
				
			| @@ -251,6 +251,8 @@ function lsp.start(config, opts) | |||||||
|     if reuse_client(client, config) then |     if reuse_client(client, config) then | ||||||
|       if lsp.buf_attach_client(bufnr, client.id) then |       if lsp.buf_attach_client(bufnr, client.id) then | ||||||
|         return client.id |         return client.id | ||||||
|  |       else | ||||||
|  |         return nil | ||||||
|       end |       end | ||||||
|     end |     end | ||||||
|   end |   end | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user