aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim_lsp/util.lua
diff options
context:
space:
mode:
authorHirokazu Hata <h.hata.ai.t@gmail.com>2020-02-16 14:46:14 +0900
committerGitHub <noreply@github.com>2020-02-16 14:46:14 +0900
commit7281d73717fec01440d62d7331a664290b72a6fa (patch)
tree22e07c08faffc0a2b9bd8763ce13c18e9e462cd0 /lua/nvim_lsp/util.lua
parentMerge pull request #122 from kdheepak/kd/add-nimls (diff)
parentadded neovim's editorconfig (diff)
downloadnvim-lspconfig-7281d73717fec01440d62d7331a664290b72a6fa.tar
nvim-lspconfig-7281d73717fec01440d62d7331a664290b72a6fa.tar.gz
nvim-lspconfig-7281d73717fec01440d62d7331a664290b72a6fa.tar.bz2
nvim-lspconfig-7281d73717fec01440d62d7331a664290b72a6fa.tar.lz
nvim-lspconfig-7281d73717fec01440d62d7331a664290b72a6fa.tar.xz
nvim-lspconfig-7281d73717fec01440d62d7331a664290b72a6fa.tar.zst
nvim-lspconfig-7281d73717fec01440d62d7331a664290b72a6fa.zip
Merge pull request #120 from teto/checkhealth
[RDY] checkhealth: add checkhealth nvim_lsp command
Diffstat (limited to 'lua/nvim_lsp/util.lua')
-rw-r--r--lua/nvim_lsp/util.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/lua/nvim_lsp/util.lua b/lua/nvim_lsp/util.lua
index 73d8e6cf..02061976 100644
--- a/lua/nvim_lsp/util.lua
+++ b/lua/nvim_lsp/util.lua
@@ -208,7 +208,7 @@ end)()
-- Returns a function(root_dir), which, when called with a root_dir it hasn't
-- seen before, will call make_config(root_dir) and start a new client.
-function M.server_per_root_dir_manager(make_config)
+function M.server_per_root_dir_manager(_make_config)
local clients = {}
local manager = {}
@@ -218,8 +218,7 @@ function M.server_per_root_dir_manager(make_config)
-- Check if we have a client alredy or start and store it.
local client_id = clients[root_dir]
if not client_id then
- local new_config = make_config(root_dir)
- new_config.root_dir = root_dir
+ local new_config = _make_config(root_dir)
new_config.on_exit = M.add_hook_before(new_config.on_exit, function()
clients[root_dir] = nil
end)