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

Commit fb36f5a

Browse files
committed
fix: error on neosnippets when no val is provide
1 parent 669f90c commit fb36f5a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lua/completion/source/snippet.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ M.getNeosnippetItems = function(prefix)
4545
if key == true then
4646
key = 'true'
4747
end
48-
local user_data = {snippet_source = 'Neosnippet', hover = val.description}
48+
local description
49+
if val == nil then description = nil else description = val.description end
50+
local user_data = {snippet_source = 'Neosnippet', hover = description}
4951
local item = {}
5052
item.word = key
5153
item.kind = kind

0 commit comments

Comments
 (0)