diff options
| author | William Boman <william@redwill.se> | 2022-08-23 13:20:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-23 19:20:29 +0800 |
| commit | 6c3cbbc4d5300a6e934e881606436748cc3e72dd (patch) | |
| tree | 553480b4b2a9ca4c8c143b7efbe5af8a542cead2 /lua/lspconfig.lua | |
| parent | docs: add an entry about the setup-hook (#1873) (diff) | |
| download | nvim-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.lua | 8 |
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 |
