From e6569c18c21be5166e4b9cc7530e828b8285c84e Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Wed, 2 Oct 2024 06:57:18 -0700 Subject: feat(lspinfo): replace :LspInfo with :checkhealth #3339 Problem: :LspInfo has its own "inner platlform" of highlights, mappings etc. And it doesn't integrate with :checkhealth. Solution: - Move the lspinfo code to a healthcheck. - LspInfo features such as highlights, "floating window" presentation, etc., should be added to :checkhealth in Nvim core, if they are really needed. - Define a "q" mapping until Nvim stable has that in :checkhealth. --- plugin/lspconfig.lua | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'plugin') diff --git a/plugin/lspconfig.lua b/plugin/lspconfig.lua index e5d924cc..fd4631d1 100644 --- a/plugin/lspconfig.lua +++ b/plugin/lspconfig.lua @@ -48,23 +48,9 @@ local get_clients_from_cmd_args = function(arg) return result end -for group, hi in pairs { - LspInfoBorder = { link = 'Label', default = true }, - LspInfoList = { link = 'Function', default = true }, - LspInfoTip = { link = 'Comment', default = true }, - LspInfoTitle = { link = 'Title', default = true }, - LspInfoFiletype = { link = 'Type', default = true }, -} do - api.nvim_set_hl(0, group, hi) -end - -- Called from plugin/lspconfig.vim because it requires knowing that the last -- script in scriptnames to be executed is lspconfig. -api.nvim_create_user_command('LspInfo', function() - require 'lspconfig.ui.lspinfo'() -end, { - desc = 'Displays attached, active, and configured language servers', -}) +api.nvim_create_user_command('LspInfo', ':che lspconfig', { desc = 'Deprecated alias to `:che lspconfig`' }) api.nvim_create_user_command('LspStart', function(info) local server_name = string.len(info.args) > 0 and info.args or nil -- cgit v1.2.3-70-g09d2