From 6e21704786f0c5cf44074c902f5472fc4caa7a1f Mon Sep 17 00:00:00 2001 From: Hirokazu Hata Date: Mon, 23 Mar 2020 12:06:03 +0900 Subject: if root_dir is not directry, we don't execute lsp.start_client fix: #161. If the buffer is not actual file like the special buffer for the plugin, it doesn't have root_dir and we should not execute lsp.start_client for that buffer. --- lua/nvim_lsp/util.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'lua/nvim_lsp/util.lua') diff --git a/lua/nvim_lsp/util.lua b/lua/nvim_lsp/util.lua index 33eff0c9..ab084ea4 100644 --- a/lua/nvim_lsp/util.lua +++ b/lua/nvim_lsp/util.lua @@ -231,6 +231,7 @@ function M.server_per_root_dir_manager(_make_config) function manager.add(root_dir) if not root_dir then return end + if not M.path.is_dir(root_dir) then return end -- Check if we have a client alredy or start and store it. local client_id = clients[root_dir] -- cgit v1.2.3-70-g09d2