fix(lsp): correct hover result handling (#30995)

Problem: vim.lsp.buf.hover() displays "No information available" when client_id
is not 1.

Solution: use vim.tbl_isempty(tbl) instead of #tbl==0
This commit is contained in:
notomo 2024-10-31 00:57:33 +09:00 committed by GitHub
parent 05d9e6a9e8
commit b4599acbf8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -53,7 +53,7 @@ function M.hover(config)
end
end
if #results1 == 0 then
if vim.tbl_isempty(results1) then
if config.silent ~= true then
vim.notify('No information available')
end