Files
neovim/test/functional/plugin
stenja a55f134ee3 fix(lsp): stale client when rpc.connect fails #41792
Problem:
When vim.lsp.rpc.connect is used for an LSP and the connection fails
(due to ECONNREFUSED, for example), the LSP client is left
uninitialized. Subsequent calls to vim.lsp.start will reuse the
uninitialized client, but no new connection will be attempted.

Solution:
When vim.lsp.rpc.connect encounters a connection error, terminate the
client. This allows the user to do something in response to the failed
connection in the on_exit callback, and also makes it so subsequent
attempts to start the LSP will try to establish a new connection rather
than using the previous uninitialized client.

Co-authored-by: Jason Stenftenagel <jasonstenftenagel@gmail.com>
2026-09-09 13:31:26 -04:00
..