aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/loader.lua
diff options
context:
space:
mode:
authorstenja <stenja@users.noreply.github.com>2026-09-09 12:31:26 -0500
committerGitHub <noreply@github.com>2026-09-09 13:31:26 -0400
commita55f134ee305ebf3cb75149025c5e75f5e2090e0 (patch)
tree82943c2d94945cb82f1a8937986c3ddc3b7c1312 /runtime/lua/vim/loader.lua
parentd24cafc06a78f6357674c2429706303538be48da (diff)
downloadrneovim-a55f134ee305ebf3cb75149025c5e75f5e2090e0.tar.gz
rneovim-a55f134ee305ebf3cb75149025c5e75f5e2090e0.tar.bz2
rneovim-a55f134ee305ebf3cb75149025c5e75f5e2090e0.zip
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>
Diffstat (limited to 'runtime/lua/vim/loader.lua')
0 files changed, 0 insertions, 0 deletions