Skip to content

Commit 5787f08

Browse files
committed
revert: cmp.visible() seems to be very slow
This reverts commit 5e2682d.
1 parent 83a6ee5 commit 5787f08

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

lua/snippy/main.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ function M.cut_text(mode, visual)
336336
end
337337

338338
function M._mirror_stops()
339-
if not util.pumvisible() and buf.current_stop ~= 0 then
339+
if buf.current_stop ~= 0 then
340340
buf.mirror_stop(buf.current_stop)
341341
end
342342
end

lua/snippy/util.lua

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,4 @@ function M.merge_snippets(current, added)
5757
return result
5858
end
5959

60-
function M.pumvisible()
61-
local ok, cmp = pcall(require, 'cmp')
62-
if ok then
63-
return cmp.visible()
64-
end
65-
return vim.fn.pumvisible() == 1
66-
end
67-
6860
return M

0 commit comments

Comments
 (0)