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

Commit 1dc317c

Browse files
authored
Merge pull request #257 from ray-x/fix-priority
bugfix: if lsp label defined, priority may return nil when get it fro…
2 parents 8c028d0 + 3746ddf commit 1dc317c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/completion/source/lsp.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ local function text_document_completion_list_to_complete_items(result, params)
116116
end
117117
end
118118
get_context_aware_snippets(item, completion_item, params.line_to_cursor)
119-
item.priority = opt.get_option('items_priority')[item.kind]
119+
item.priority = opt.get_option('items_priority')[item.kind] or opt.get_option('items_priority')[kind]
120120
item.menu = completion_item.detail or ''
121121
match.matching(matches, params.prefix, item)
122122
end

0 commit comments

Comments
 (0)