remove preselect for cmp

This commit is contained in:
Fabio Lenherr / DashieTM 2023-03-14 23:27:27 +01:00
parent 093ae62e7a
commit 477afdf6f4
3 changed files with 7 additions and 3 deletions

View file

@ -39,7 +39,7 @@ return {
return {
preselect = cmp.PreselectMode.None,
completion = {
completeopt = "menu,menuone,noinsert",
-- completeopt = "menu,menuone,noinsert",
},
snippet = {
expand = function(args)
@ -52,6 +52,10 @@ return {
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
["<S-CR>"] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace,
select = false,
}), -- Accept cur
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()