From 5dce1b778b85c717f6614e3f4da45e9f19f54435 Mon Sep 17 00:00:00 2001 From: hrsh7th Date: Sat, 26 Aug 2023 15:31:42 +0000 Subject: [PATCH] Format with stylua --- lua/cmp/config/compare.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lua/cmp/config/compare.lua b/lua/cmp/config/compare.lua index a7f7bda93..f39921baf 100644 --- a/lua/cmp/config/compare.lua +++ b/lua/cmp/config/compare.lua @@ -14,7 +14,6 @@ local compare = {} ---@alias cmp.ComparatorFunction fun(entry1: cmp.Entry, entry2: cmp.Entry): boolean | nil ---@alias cmp.Comparator cmp.ComparatorFunction | cmp.ComparatorFunctor - ---offset: Entries with smaller offset will be ranked higher. ---@type cmp.ComparatorFunction compare.offset = function(entry1, entry2) @@ -72,8 +71,8 @@ compare.recently_used = setmetatable({ ---Exceptions are that Text(1) will be ranked the lowest, and snippets be the highest. ---@type cmp.ComparatorFunction compare.kind = function(entry1, entry2) - local kind1 = entry1:get_kind() --- @type lsp.CompletionItemKind | number - local kind2 = entry2:get_kind() --- @type lsp.CompletionItemKind | number + local kind1 = entry1:get_kind() --- @type lsp.CompletionItemKind | number + local kind2 = entry2:get_kind() --- @type lsp.CompletionItemKind | number kind1 = kind1 == types.lsp.CompletionItemKind.Text and 100 or kind1 kind2 = kind2 == types.lsp.CompletionItemKind.Text and 100 or kind2 if kind1 ~= kind2 then