aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/util.lua13
1 files changed, 12 insertions, 1 deletions
diff --git a/lua/lspconfig/util.lua b/lua/lspconfig/util.lua
index 477a41f5..917cc765 100644
--- a/lua/lspconfig/util.lua
+++ b/lua/lspconfig/util.lua
@@ -388,7 +388,7 @@ function M.get_clients_from_cmd_args(arg)
result[id] = vim.lsp.get_client_by_id(tonumber(id))
end
if vim.tbl_isempty(result) then
- return vim.lsp.get_active_clients()
+ return M.get_managed_clients()
end
return vim.tbl_values(result)
end
@@ -401,4 +401,15 @@ function M.get_active_client_by_name(bufnr, servername)
end
end
+function M.get_managed_clients()
+ local configs = require 'lspconfig.configs'
+ local clients = {}
+ for _, config in pairs(configs) do
+ if config.manager then
+ vim.list_extend(clients, config.manager.clients())
+ end
+ end
+ return clients
+end
+
return M