mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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
This commit is contained in:
parent
52623ce935
commit
378615b8ee
@ -4,6 +4,8 @@ local log = require('vim.lsp.log')
|
|||||||
local protocol = require('vim.lsp.protocol')
|
local protocol = require('vim.lsp.protocol')
|
||||||
local validate, schedule, schedule_wrap = vim.validate, vim.schedule, vim.schedule_wrap
|
local validate, schedule, schedule_wrap = vim.validate, vim.schedule, vim.schedule_wrap
|
||||||
|
|
||||||
|
local is_win = uv.os_uname().version:find('Windows')
|
||||||
|
|
||||||
---@private
|
---@private
|
||||||
--- Checks whether a given path exists and is a directory.
|
--- Checks whether a given path exists and is a directory.
|
||||||
---@param filename (string) path to check
|
---@param filename (string) path to check
|
||||||
@ -321,7 +323,7 @@ local function start(cmd, cmd_args, dispatchers, extra_spawn_params)
|
|||||||
local spawn_params = {
|
local spawn_params = {
|
||||||
args = cmd_args,
|
args = cmd_args,
|
||||||
stdio = { stdin, stdout, stderr },
|
stdio = { stdin, stdout, stderr },
|
||||||
detached = true,
|
detached = not is_win,
|
||||||
}
|
}
|
||||||
if extra_spawn_params then
|
if extra_spawn_params then
|
||||||
spawn_params.cwd = extra_spawn_params.cwd
|
spawn_params.cwd = extra_spawn_params.cwd
|
||||||
|
Loading…
Reference in New Issue
Block a user