From 6d4aabf5a764176ea93512c6f29454b225b3c564 Mon Sep 17 00:00:00 2001 From: fiplox Date: Sun, 22 Jan 2023 17:46:35 +0100 Subject: [PATCH] update behavior --- lua/plugins/cmp.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index e8b10a3..073b13d 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -124,10 +124,10 @@ function M.config() mapping = { [''] = cmp.mapping(function(fallback) if cmp.visible() then - cmp.select_next_item() - -- cmp.complete() + cmp.select_next_item { behavior = cmp.SelectBehavior.Insert } else cmp.complete() + cmp.select_next_item { behavior = cmp.SelectBehavior.Insert } end end, { 'i', 's', 'c' }), [''] = cmp.mapping(function(fallback) @@ -141,7 +141,7 @@ function M.config() i = cmp.mapping.confirm { behavior = cmp.ConfirmBehavior.Replace, select = false }, c = function(fallback) if cmp.visible() then - cmp.confirm { behavior = cmp.ConfirmBehavior.Replace, select = false } + cmp.confirm { behavior = cmp.ConfirmBehavior.Insert, select = true } else fallback() end