This commit is contained in:
hrsh7th
2021-11-01 13:58:41 +09:00
parent baa39271b2
commit e8cb695b0b
4 changed files with 37 additions and 19 deletions

View File

@@ -35,7 +35,7 @@ compare.recently_used = setmetatable({
records = {},
add_entry = function(self, e)
self.records[e.completion_item.label] = vim.loop.now()
end
end,
}, {
__call = function(self, entry1, entry2)
local t1 = self.records[entry1.completion_item.label] or -1
@@ -43,7 +43,7 @@ compare.recently_used = setmetatable({
if t1 ~= t2 then
return t1 > t2
end
end
end,
})
-- kind