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

Commit 8f1764f

Browse files
committed
add insert mode check to complete
Signed-off-by: Tomas Slusny <[email protected]>
1 parent 9b50176 commit 8f1764f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lua/autocomplete/buffer.lua

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ local state = {
1212
}
1313

1414
local function complete(prefix, cmp_start, items)
15+
if vim.fn.mode() ~= 'i' then
16+
return
17+
end
18+
1519
items = vim.tbl_filter(function(item)
1620
return #prefix == 0 or #vim.fn.matchfuzzy({ item.word }, prefix) > 0
1721
end, items)

0 commit comments

Comments
 (0)