aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/util.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/lspconfig/util.lua')
-rw-r--r--lua/lspconfig/util.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/lua/lspconfig/util.lua b/lua/lspconfig/util.lua
index 72035748..4d340391 100644
--- a/lua/lspconfig/util.lua
+++ b/lua/lspconfig/util.lua
@@ -272,7 +272,8 @@ function M.server_per_root_dir_manager(_make_config)
end)
-- Launch the server in the root directory used internally by lspconfig, if otherwise unset
- if not new_config.cmd_cwd then
+ -- also check that the path exist
+ if not new_config.cmd_cwd and uv.fs_realpath(root_dir) then
new_config.cmd_cwd = root_dir
end