Skip to content

<CR> inserts <C-R>=UltiSnips#ExpandSnippet()<CR> with nvim-cmp and Ultisnips #843

Closed Answered by fidelski
fidelski asked this question in Q&A
Discussion options

You must be logged in to vote

Oh boy! I accidently configured <CR> twice 🙈 - once in the configuration for Ultisnips:

 vim.g.UltiSnipsExpandTrigger = '<CR>'

and in:

cmp.setup ({
...
mapping = ...
                ['<CR>'] = cmp.mapping.confirm ({
                    behavior = cmp.ConfirmBehavior.Replace,
                    select = false
                }),

Removing the configuration of vim.g.UltiSnipsExpandTrigger = '<CR>' solves the problem!

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@fidelski
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by fidelski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants