update behavior
This commit is contained in:
parent
3bb590f82f
commit
6d4aabf5a7
@ -124,10 +124,10 @@ function M.config()
|
|||||||
mapping = {
|
mapping = {
|
||||||
['<TAB>'] = cmp.mapping(function(fallback)
|
['<TAB>'] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_next_item()
|
cmp.select_next_item { behavior = cmp.SelectBehavior.Insert }
|
||||||
-- cmp.complete()
|
|
||||||
else
|
else
|
||||||
cmp.complete()
|
cmp.complete()
|
||||||
|
cmp.select_next_item { behavior = cmp.SelectBehavior.Insert }
|
||||||
end
|
end
|
||||||
end, { 'i', 's', 'c' }),
|
end, { 'i', 's', 'c' }),
|
||||||
['<S-TAB>'] = cmp.mapping(function(fallback)
|
['<S-TAB>'] = cmp.mapping(function(fallback)
|
||||||
@ -141,7 +141,7 @@ function M.config()
|
|||||||
i = cmp.mapping.confirm { behavior = cmp.ConfirmBehavior.Replace, select = false },
|
i = cmp.mapping.confirm { behavior = cmp.ConfirmBehavior.Replace, select = false },
|
||||||
c = function(fallback)
|
c = function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.confirm { behavior = cmp.ConfirmBehavior.Replace, select = false }
|
cmp.confirm { behavior = cmp.ConfirmBehavior.Insert, select = true }
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user