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-u>'] = cmp.mapping.scroll_docs(4),
|
||||||
['<C-Space>'] = cmp.mapping.complete(),
|
['<C-Space>'] = cmp.mapping.complete(),
|
||||||
['<C-e>'] = cmp.mapping.close(),
|
['<C-e>'] = cmp.mapping.close(),
|
||||||
['<CR>'] = cmp.mapping.confirm({
|
-- disabled for autopairs mapping
|
||||||
|
--[[ ['<CR>'] = cmp.mapping.confirm({
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
behavior = cmp.ConfirmBehavior.Replace,
|
||||||
select = true,
|
select = true,
|
||||||
}),
|
}), ]]
|
||||||
['<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()
|
||||||
|
@ -59,13 +60,13 @@ cmp.setup({
|
||||||
experimental = {
|
experimental = {
|
||||||
ghost_text = true,
|
ghost_text = true,
|
||||||
},
|
},
|
||||||
sources = {
|
sources = cmp.config.sources({
|
||||||
{ name = 'nvim_lsp' },
|
{ name = 'nvim_lsp' },
|
||||||
{ name = 'luasnip' },
|
|
||||||
{ name = 'buffer' },
|
|
||||||
{ name = 'nvim_lua' },
|
{ name = 'nvim_lua' },
|
||||||
|
{ name = 'buffer' },
|
||||||
|
{ name = 'luasnip' },
|
||||||
{ name = 'path' },
|
{ name = 'path' },
|
||||||
},
|
}),
|
||||||
formatting = {
|
formatting = {
|
||||||
format = require('lspkind').cmp_format({
|
format = require('lspkind').cmp_format({
|
||||||
with_text = true,
|
with_text = true,
|
||||||
|
|
Loading…
Add table
Reference in a new issue