neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 378615b8ee9440edb9ab7c71d847d03d52c61b2f
parent 52623ce9353bac2b4a82c0197c5a08202e74b156
Author: Gregory Anders <8965202+gpanders@users.noreply.github.com>
Date:   Sun, 22 May 2022 13:21:44 -0600

fix(lsp): do not detach LSP servers on Windows #18703

Detaching the process seems to have unintended side effects on Windows,
so only do it by default on non-Windows platforms.

Ref: https://github.com/neovim/nvim-lspconfig/issues/1907
Closes https://github.com/neovim/nvim-lspconfig/pull/1913
Diffstat:
Mruntime/lua/vim/lsp/rpc.lua | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/runtime/lua/vim/lsp/rpc.lua b/runtime/lua/vim/lsp/rpc.lua @@ -4,6 +4,8 @@ local log = require('vim.lsp.log') local protocol = require('vim.lsp.protocol') local validate, schedule, schedule_wrap = vim.validate, vim.schedule, vim.schedule_wrap +local is_win = uv.os_uname().version:find('Windows') + ---@private --- Checks whether a given path exists and is a directory. ---@param filename (string) path to check @@ -321,7 +323,7 @@ local function start(cmd, cmd_args, dispatchers, extra_spawn_params) local spawn_params = { args = cmd_args, stdio = { stdin, stdout, stderr }, - detached = true, + detached = not is_win, } if extra_spawn_params then spawn_params.cwd = extra_spawn_params.cwd