diff options
author | notomo <18519692+notomo@users.noreply.github.com> | 2024-10-31 00:57:33 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-30 16:57:33 +0100 |
commit | b4599acbf8e30aa1234bc4041546f960dcc3a238 (patch) | |
tree | 6df8b4aa266f44d09cd3ecfa50f5bbb09b95663c /runtime/lua/vim/lsp/buf.lua | |
parent | 05d9e6a9e850ee797a4a018e72156dd62831a4b6 (diff) | |
download | rneovim-b4599acbf8e30aa1234bc4041546f960dcc3a238.tar.gz rneovim-b4599acbf8e30aa1234bc4041546f960dcc3a238.tar.bz2 rneovim-b4599acbf8e30aa1234bc4041546f960dcc3a238.zip |
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
Diffstat (limited to 'runtime/lua/vim/lsp/buf.lua')
-rw-r--r-- | runtime/lua/vim/lsp/buf.lua | 2 |
1 files changed, 1 insertions, 1 deletions
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 |