From b4599acbf8e30aa1234bc4041546f960dcc3a238 Mon Sep 17 00:00:00 2001 From: notomo <18519692+notomo@users.noreply.github.com> Date: Thu, 31 Oct 2024 00:57:33 +0900 Subject: 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 --- runtime/lua/vim/lsp/buf.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/lua/vim/lsp/buf.lua') diff --git a/runtime/lua/vim/lsp/buf.lua b/runtime/lua/vim/lsp/buf.lua index dd06b1b6c0..4818359fb3 100644 --- a/runtime/lua/vim/lsp/buf.lua +++ b/runtime/lua/vim/lsp/buf.lua @@ -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 -- cgit