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

View File

@@ -91,7 +91,7 @@ return function()
else
fallback()
end
end
end,
}),
['<S-Tab>'] = mapping({
c = function(fallback)
@@ -105,7 +105,7 @@ return function()
else
fallback()
end
end
end,
}),
['<C-n>'] = mapping(mapping.select_next_item({ behavior = types.cmp.SelectBehavior.Insert }), { 'i', 'c' }),
['<C-p>'] = mapping(mapping.select_prev_item({ behavior = types.cmp.SelectBehavior.Insert }), { 'i', 'c' }),