diff options
| author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2025-01-27 22:04:47 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-27 13:04:47 -0800 |
| commit | 1f941b3668151963fca3e1230922c433ea4b7b64 (patch) | |
| tree | 8d60dea0ac4991fb95d6ce521189b89e8ee1eb97 /lua | |
| parent | docs: update configs.md (diff) | |
| download | nvim-lspconfig-1f941b3668151963fca3e1230922c433ea4b7b64.tar nvim-lspconfig-1f941b3668151963fca3e1230922c433ea4b7b64.tar.gz nvim-lspconfig-1f941b3668151963fca3e1230922c433ea4b7b64.tar.bz2 nvim-lspconfig-1f941b3668151963fca3e1230922c433ea4b7b64.tar.lz nvim-lspconfig-1f941b3668151963fca3e1230922c433ea4b7b64.tar.xz nvim-lspconfig-1f941b3668151963fca3e1230922c433ea4b7b64.tar.zst nvim-lspconfig-1f941b3668151963fca3e1230922c433ea4b7b64.zip | |
revert: "refactor!: make available_servers function private" #3589
This reverts commit e118ce58dab72c17216292eef7df4cee3cf60885.
It turns out `util.available_servers` is used more than anticipated, so
we revert the privatization for the time being.
Closes https://github.com/neovim/nvim-lspconfig/issues/3588
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/health.lua | 2 | ||||
| -rw-r--r-- | lua/lspconfig/util.lua | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lua/lspconfig/health.lua b/lua/lspconfig/health.lua index c88d786d..64c584cf 100644 --- a/lua/lspconfig/health.lua +++ b/lua/lspconfig/health.lua @@ -224,7 +224,7 @@ local function check_lspconfig(bufnr) bufnr = (bufnr and bufnr ~= -1) and bufnr or nil health.start('LSP configs active in this session (globally)') - health.info('Configured servers: ' .. table.concat(util._available_servers(), ', ')) + health.info('Configured servers: ' .. table.concat(util.available_servers(), ', ')) local deprecated_servers = {} for server_name, deprecate in pairs(require('lspconfig').server_aliases()) do table.insert(deprecated_servers, ('%s -> %s'):format(server_name, deprecate.to)) diff --git a/lua/lspconfig/util.lua b/lua/lspconfig/util.lua index bfcbb0a6..ae891010 100644 --- a/lua/lspconfig/util.lua +++ b/lua/lspconfig/util.lua @@ -223,7 +223,8 @@ function M.get_managed_clients() return clients end -function M._available_servers() +--- @deprecated use `vim.lsp.config` in Nvim 0.11+ instead. +function M.available_servers() local servers = {} local configs = require 'lspconfig.configs' for server, config in pairs(configs) do |
