Update mapping configuration

This commit is contained in:
hrsh7th
2021-08-11 23:24:47 +09:00
parent 4c9462c28c
commit c2f872920e
8 changed files with 196 additions and 88 deletions

View File

@@ -29,20 +29,10 @@ return function()
winhighlight = 'NormalFloat:CmpDocumentation,FloatBorder:CmpDocumentationBorder',
maxwidth = math.floor((WIDE_HEIGHT * 2) * (vim.o.columns / (WIDE_HEIGHT * 2 * 16 / 9))),
maxheight = math.floor(WIDE_HEIGHT * (WIDE_HEIGHT / vim.o.lines)),
mapping = {
['<C-d>'] = types.cmp.ScrollDirection.Up,
['<C-f>'] = types.cmp.ScrollDirection.Down,
}
},
confirmation = {
default_behavior = types.cmp.ConfirmBehavior.Replace,
mapping = {
['<CR>'] = {
behavior = types.cmp.ConfirmBehavior.Replace,
select = true,
},
}
},
sorting = {
@@ -58,6 +48,8 @@ return function()
}
},
mapping = {},
formatting = {
format = function(e, suggest_offset)
local item = e:get_completion_item()