diff options
| author | Michael Lingelbach <m.j.lbach@gmail.com> | 2021-11-11 10:36:08 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-11 10:36:08 -0800 |
| commit | bf96d7276fb0391f24b96eaa07f0e9d6bd536c81 (patch) | |
| tree | 5ddd478cb0735cf11190395578d87041a068b915 /lua/lspconfig/util.lua | |
| parent | fix(gopls): resolve top-level go.mod as root_dir (#1399) (diff) | |
| download | nvim-lspconfig-bf96d7276fb0391f24b96eaa07f0e9d6bd536c81.tar nvim-lspconfig-bf96d7276fb0391f24b96eaa07f0e9d6bd536c81.tar.gz nvim-lspconfig-bf96d7276fb0391f24b96eaa07f0e9d6bd536c81.tar.bz2 nvim-lspconfig-bf96d7276fb0391f24b96eaa07f0e9d6bd536c81.tar.lz nvim-lspconfig-bf96d7276fb0391f24b96eaa07f0e9d6bd536c81.tar.xz nvim-lspconfig-bf96d7276fb0391f24b96eaa07f0e9d6bd536c81.tar.zst nvim-lspconfig-bf96d7276fb0391f24b96eaa07f0e9d6bd536c81.zip | |
feat: spawn the language server in resolved root directory (#1407)
Diffstat (limited to 'lua/lspconfig/util.lua')
| -rw-r--r-- | lua/lspconfig/util.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lua/lspconfig/util.lua b/lua/lspconfig/util.lua index dbac70fd..8fe94741 100644 --- a/lua/lspconfig/util.lua +++ b/lua/lspconfig/util.lua @@ -273,6 +273,10 @@ function M.server_per_root_dir_manager(_make_config) clients[root_dir] = nil 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 + -- Sending rootDirectory and workspaceFolders as null is not explicitly -- codified in the spec. Certain servers crash if initialized with a NULL -- root directory. |
