mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04: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:
parent
6a264e0897
commit
5eee633c97
@ -251,6 +251,8 @@ function lsp.start(config, opts)
|
||||
if reuse_client(client, config) then
|
||||
if lsp.buf_attach_client(bufnr, client.id) then
|
||||
return client.id
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user