Skip to content

Commit

Permalink
Format with stylua
Browse files Browse the repository at this point in the history
  • Loading branch information
hrsh7th authored and github-actions[bot] committed Aug 26, 2023
1 parent 026ef94 commit 5dce1b7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lua/cmp/config/compare.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5dce1b7

Please sign in to comment.