aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2022-08-23 13:20:29 +0200
committerGitHub <noreply@github.com>2022-08-23 19:20:29 +0800
commit6c3cbbc4d5300a6e934e881606436748cc3e72dd (patch)
tree553480b4b2a9ca4c8c143b7efbe5af8a542cead2 /lua/lspconfig.lua
parentdocs: add an entry about the setup-hook (#1873) (diff)
downloadnvim-lspconfig-6c3cbbc4d5300a6e934e881606436748cc3e72dd.tar
nvim-lspconfig-6c3cbbc4d5300a6e934e881606436748cc3e72dd.tar.gz
nvim-lspconfig-6c3cbbc4d5300a6e934e881606436748cc3e72dd.tar.bz2
nvim-lspconfig-6c3cbbc4d5300a6e934e881606436748cc3e72dd.tar.lz
nvim-lspconfig-6c3cbbc4d5300a6e934e881606436748cc3e72dd.tar.xz
nvim-lspconfig-6c3cbbc4d5300a6e934e881606436748cc3e72dd.tar.zst
nvim-lspconfig-6c3cbbc4d5300a6e934e881606436748cc3e72dd.zip
fix: only consider servers that have been set up as available (#2066)
* test: add failing test * fix(lspconfig): only consider servers that have been set up as available
Diffstat (limited to 'lua/lspconfig.lua')
-rw-r--r--lua/lspconfig.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/lua/lspconfig.lua b/lua/lspconfig.lua
index 779ec426..b46ef65d 100644
--- a/lua/lspconfig.lua
+++ b/lua/lspconfig.lua
@@ -7,7 +7,13 @@ local M = {
M._root = {}
function M.available_servers()
- return vim.tbl_keys(configs)
+ local servers = {}
+ for server, config in pairs(configs) do
+ if config.manager ~= nil then
+ table.insert(servers, server)
+ end
+ end
+ return servers
end
-- Called from plugin/lspconfig.vim because it requires knowing that the last