fix: cmp.visible

This commit is contained in:
Folke Lemaitre 2024-11-01 17:39:28 +01:00
parent e48a6a0278
commit f188c5729e

View file

@ -71,16 +71,16 @@ function M.add_missing_snippet_docs(window)
end end
function M.visible() function M.visible()
---@module 'blink.cmp'
local blink = package.loaded["blink.cmp"]
if blink then
return blink.windows and blink.windows.autocomplete.win:is_open()
end
---@module 'cmp' ---@module 'cmp'
local cmp = package.loaded["cmp"] local cmp = package.loaded["cmp"]
if cmp then if cmp then
return cmp.core.view:visible() return cmp.core.view:visible()
end end
---@module 'blink.cmp'
local blink = package.loaded["blink.cmp"]
if blink then
return blink.windows.autocomplete.win:is_open()
end
return false return false
end end