Files
neovim/runtime/lua
phanium 5c4b64aae5 fix(lsp): wait for exit_timeout on quit #37597
Problem:
When quitting Nvim, LSP servers will not be force-stopped, even if
ClientConfig.exit_timeout is set to an integer.

    pkill emmylua_ls; VIMRUNTIME=runtime/ nvim --clean -u repro.lua repro.lua ; waitpid $(pgrep emmylua_ls)

    vim.lsp.config('foo', { cmd = { 'emmylua_ls' }, exit_timeout = 1000 })
    vim.lsp.enable('foo')
    vim.defer_fn(vim.cmd.quit, 500)

Solution:
On VimExit, wait up to `exit_timeout:integer` milliseconds for servers
to exit. Do this with an explicit `vim.wait()`, because the actual
force-stop is deferred, and won't be attempted if Nvim exits before
then.

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2026-02-15 07:33:49 -05:00
..
2026-01-23 09:30:37 +01:00
2025-02-09 18:10:54 +01:00
2025-12-15 13:55:15 -05:00