mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-18 09:44:50 +02:00
fix(util.cmp): implement is_visible for blink
This commit is contained in:
parent
642434ff1f
commit
b3e5c54416
1 changed files with 9 additions and 1 deletions
|
@ -73,7 +73,15 @@ end
|
||||||
function M.visible()
|
function M.visible()
|
||||||
---@module 'cmp'
|
---@module 'cmp'
|
||||||
local cmp = package.loaded["cmp"]
|
local cmp = package.loaded["cmp"]
|
||||||
return cmp and cmp.core.view:visible()
|
if cmp then
|
||||||
|
return cmp.core.view:visible()
|
||||||
|
end
|
||||||
|
---@module 'blink.cmp'
|
||||||
|
local blink = package.loaded["blink.cmp"]
|
||||||
|
if blink then
|
||||||
|
return blink.windows.autocomplete.win:is_open()
|
||||||
|
end
|
||||||
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
-- This is a better implementation of `cmp.confirm`:
|
-- This is a better implementation of `cmp.confirm`:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue