Skip to content

Commit cb29802

Browse files
authored
Merge pull request #6 from marty-oehme/fix/error-on-missing-label
Add label sanity check to entry formatting
2 parents 427aa92 + 6173572 commit cb29802

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lua/cmp_pandoc/utils.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ M.format = function(str, field)
4646
end
4747

4848
M.format_entry = function(opts)
49+
if not opts.label then return nil end
4950
local label_prefix = opts.prefix or "@"
5051
local kind = cmp.lsp.CompletionItemKind[opts.kind] or cmp.lsp.CompletionItemKind.Reference
5152
local doc = opts.doc or true

0 commit comments

Comments
 (0)