Skip to content
This repository was archived by the owner on Oct 13, 2021. It is now read-only.

Commit d5685ec

Browse files
authored
Merge pull request #279 from lukas-reineke/bugfix/mutli-server-hover
hover if _any_ of the connected server support it
2 parents 6c591ab + 54df936 commit d5685ec

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lua/completion/hover.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,14 @@ M.autoOpenHoverInPopup = function()
352352
M.winnr = winnr
353353
end
354354
else
355+
local has_hover = false
355356
for _, value in pairs(vim.lsp.buf_get_clients(0)) do
356-
if value.resolved_capabilities.hover == false then return end
357+
if value.resolved_capabilities.hover then
358+
has_hover = true
359+
break
360+
end
357361
end
362+
if not has_hover then return end
358363
local row, col = unpack(api.nvim_win_get_cursor(0))
359364
row = row - 1
360365
local line = api.nvim_buf_get_lines(0, row, row+1, true)[1]

0 commit comments

Comments
 (0)