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

Commit 8192a4d

Browse files
committed
fix: handle vim.NIL properly in completion items
1 parent 7aedc74 commit 8192a4d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lua/completion/util.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ end
1616
-- completion items --
1717
------------------------
1818
local function get_completion_word(item)
19-
if item.insertText ~= nil then
19+
if item.insertText ~= nil and item.insertText ~= vim.NIL then
2020
return item.insertText
21-
elseif item.textEdit ~= nil and item.textEdit.newText ~= nil and item.insertTextFormat ~= 2 then
21+
elseif item.textEdit ~= nil and item.textEdit ~= vim.NIL and item.textEdit.newText ~= nil and item.insertTextFormat ~= 2 then
2222
return item.textEdit.newText
2323
end
2424
return item.label

0 commit comments

Comments
 (0)