fixed cmp CR behaviour at end of line
This commit is contained in:
parent
6e3a2f931c
commit
3e49aa40a5
@ -51,7 +51,13 @@ return {
|
||||
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c', 's' }),
|
||||
['<C-e>'] = cmp.mapping(cmp.mapping.close(), { 'i', 'c', 's' }),
|
||||
['<CR>'] = cmp.mapping({
|
||||
i = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = false }),
|
||||
i = function(fallback)
|
||||
if cmp.visible() and cmp.get_active_entry() then
|
||||
cmp.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = false })
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end,
|
||||
c = cmp.mapping.confirm({ select = false }),
|
||||
s = cmp.mapping.confirm({ select = false }),
|
||||
}),
|
||||
|
Loading…
x
Reference in New Issue
Block a user