properly detect LSP client after LSP restart (closes issue #174)

main
bhagwan 3 years ago
parent 2c04f7495f
commit 7025700c66

@ -395,7 +395,7 @@ M.diagnostics = function(opts)
if not opts then return end
local lsp_clients = vim.lsp.buf_get_clients(0)
if #lsp_clients == 0 then
if utils.tbl_length(lsp_clients) == 0 then
utils.info("LSP: no client attached")
return
end
@ -568,7 +568,7 @@ local function check_capabilities(feature)
if supported_client then
return true
else
if #clients == 0 then
if utils.tbl_length(clients) == 0 then
utils.info("LSP: no client attached")
else
utils.info("LSP: server does not support " .. feature)

Loading…
Cancel
Save