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.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/lua/lspconfig/util.lua b/lua/lspconfig/util.lua
index aaba4db2..72035748 100644
--- a/lua/lspconfig/util.lua
+++ b/lua/lspconfig/util.lua
@@ -271,8 +271,10 @@ function M.server_per_root_dir_manager(_make_config)
single_file_clients[root_dir] = nil
end)
- -- Launch the server in the root directory used internally by lspconfig, if applicable
- new_config.cwd = root_dir
+ -- Launch the server in the root directory used internally by lspconfig, if otherwise unset
+ if not new_config.cmd_cwd then
+ new_config.cmd_cwd = root_dir
+ end
-- Sending rootDirectory and workspaceFolders as null is not explicitly
-- codified in the spec. Certain servers crash if initialized with a NULL