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

Commit 54df936

Browse files
committed
break out of loop if capability match found
1 parent bd8685c commit 54df936

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lua/completion/hover.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,10 @@ M.autoOpenHoverInPopup = function()
353353
else
354354
local has_hover = false
355355
for _, value in pairs(vim.lsp.buf_get_clients(0)) do
356-
has_hover = value.resolved_capabilities.hover or has_hover
356+
if value.resolved_capabilities.hover then
357+
has_hover = true
358+
break
359+
end
357360
end
358361
if not has_hover then return end
359362
local row, col = unpack(api.nvim_win_get_cursor(0))

0 commit comments

Comments
 (0)