fix(autocomplete): disable cmp cr mapping that was messing with autopairs
This commit is contained in:
parent
6ff029a0c8
commit
6b1da29c14
1 changed files with 7 additions and 6 deletions
|
@ -21,10 +21,11 @@ cmp.setup({
|
|||
['<C-u>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.close(),
|
||||
['<CR>'] = cmp.mapping.confirm({
|
||||
-- disabled for autopairs mapping
|
||||
--[[ ['<CR>'] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
}),
|
||||
}), ]]
|
||||
['<Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
|
@ -59,13 +60,13 @@ cmp.setup({
|
|||
experimental = {
|
||||
ghost_text = true,
|
||||
},
|
||||
sources = {
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'buffer' },
|
||||
{ name = 'nvim_lua' },
|
||||
{ name = 'buffer' },
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'path' },
|
||||
},
|
||||
}),
|
||||
formatting = {
|
||||
format = require('lspkind').cmp_format({
|
||||
with_text = true,
|
||||
|
|
Loading…
Add table
Reference in a new issue