diff options
| author | Michael Lingelbach <m.j.lbach@gmail.com> | 2021-11-25 23:28:56 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-25 23:28:56 -0500 |
| commit | 10ad0cca1b83713ed98ed4cb7ea60f2ea8e55c49 (patch) | |
| tree | e1bf8ea8345901e9bda4312b4b4597e3854c6acf /lua | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-10ad0cca1b83713ed98ed4cb7ea60f2ea8e55c49.tar nvim-lspconfig-10ad0cca1b83713ed98ed4cb7ea60f2ea8e55c49.tar.gz nvim-lspconfig-10ad0cca1b83713ed98ed4cb7ea60f2ea8e55c49.tar.bz2 nvim-lspconfig-10ad0cca1b83713ed98ed4cb7ea60f2ea8e55c49.tar.lz nvim-lspconfig-10ad0cca1b83713ed98ed4cb7ea60f2ea8e55c49.tar.xz nvim-lspconfig-10ad0cca1b83713ed98ed4cb7ea60f2ea8e55c49.tar.zst nvim-lspconfig-10ad0cca1b83713ed98ed4cb7ea60f2ea8e55c49.zip | |
fix: only set cmd_cwd if filepath exists (#1485)
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/util.lua | 3 |
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 |
