diff options
| author | glepnir <glephunter@gmail.com> | 2024-09-18 20:36:07 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-18 20:36:07 +0800 |
| commit | 73e0002b6f211376bbf36c31a2f812aedf6bd6b0 (patch) | |
| tree | e3320b5a0458b432d0762e4ade9ac4cadcbdc2c7 /lua/lspconfig/ui | |
| parent | fix(ltex-ls): command fails on windows when using mason (#3305) (diff) | |
| download | nvim-lspconfig-73e0002b6f211376bbf36c31a2f812aedf6bd6b0.tar nvim-lspconfig-73e0002b6f211376bbf36c31a2f812aedf6bd6b0.tar.gz nvim-lspconfig-73e0002b6f211376bbf36c31a2f812aedf6bd6b0.tar.bz2 nvim-lspconfig-73e0002b6f211376bbf36c31a2f812aedf6bd6b0.tar.lz nvim-lspconfig-73e0002b6f211376bbf36c31a2f812aedf6bd6b0.tar.xz nvim-lspconfig-73e0002b6f211376bbf36c31a2f812aedf6bd6b0.tar.zst nvim-lspconfig-73e0002b6f211376bbf36c31a2f812aedf6bd6b0.zip | |
feat: show deprecate servers list in LspInfo (#3308)
* feat: show deprecate servers list in LspInfo
In order to smoothly transition to the vim.lsp.start interface in the future,
adding checkhealth here is meaningless. Only the lspinfo information window
is available. So shown deprecate servers list in LspInfo and update the
server deprecate remove version to 0.2.1. 0.2.0 is tagged too
quickly cause some servers not removed.
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
Diffstat (limited to 'lua/lspconfig/ui')
| -rw-r--r-- | lua/lspconfig/ui/lspinfo.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lua/lspconfig/ui/lspinfo.lua b/lua/lspconfig/ui/lspinfo.lua index 886014aa..e0b9bf96 100644 --- a/lua/lspconfig/ui/lspinfo.lua +++ b/lua/lspconfig/ui/lspinfo.lua @@ -268,8 +268,14 @@ return function() '', 'Configured servers list: ' .. table.concat(util.available_servers(), ', '), } - + local deprecated_servers = {} vim.list_extend(buf_lines, matching_config_header) + for server_name, deprecate in pairs(require('lspconfig').server_aliases()) do + table.insert(deprecated_servers, ('%s -> %s'):format(server_name, deprecate.to)) + end + if #deprecated_servers > 0 then + vim.list_extend(buf_lines, { '', 'Deprecated servers: ' .. table.concat(deprecated_servers, ' ') }) + end local fmt_buf_lines = indent_lines(buf_lines, ' ') |
