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 /test | |
| 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 'test')
| -rw-r--r-- | test/lspconfig_spec.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/lspconfig_spec.lua b/test/lspconfig_spec.lua index 163bf887..8fc117c5 100644 --- a/test/lspconfig_spec.lua +++ b/test/lspconfig_spec.lua @@ -251,5 +251,19 @@ describe('lspconfig', function() } ) end) + + it("excludes indexed server configs that haven't been set up", function() + eq( + exec_lua [[ + local lspconfig = require("lspconfig") + local actual = nil + local _ = lspconfig.sumneko_lua + local _ = lspconfig.tsserver + lspconfig.rust_analyzer.setup {} + return lspconfig.available_servers() + ]], + { 'rust_analyzer' } + ) + end) end) end) |
