Change configuration schema

This commit is contained in:
hrsh7th
2021-08-05 16:21:07 +09:00
parent cf61d0de50
commit 399cee4e24
3 changed files with 18 additions and 21 deletions

View File

@@ -42,25 +42,15 @@ return function()
},
sorting = {
sort = function(entries)
table.sort(entries, function(entry1, entry2)
for _, fn in ipairs({
compare.offset,
compare.exact,
compare.score,
compare.kind,
compare.sort_text,
compare.length,
compare.order,
}) do
local diff = fn(entry1, entry2)
if diff ~= nil then
return diff
end
end
end)
return entries
end
comparators = {
compare.offset,
compare.exact,
compare.score,
compare.kind,
compare.sort_text,
compare.length,
compare.order,
}
},
formatting = {