fix(autocomplete): update autopairs setting
This commit is contained in:
parent
303d01b3e8
commit
9b64d35ad3
1 changed files with 5 additions and 12 deletions
|
@ -22,10 +22,10 @@ cmp.setup({
|
|||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.close(),
|
||||
-- disabled for autopairs mapping
|
||||
--[[ ['<CR>'] = cmp.mapping.confirm({
|
||||
['<CR>'] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
}), ]]
|
||||
}),
|
||||
['<Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
|
@ -85,13 +85,6 @@ require('nvim-autopairs').setup({
|
|||
disable_filetype = { 'TelescopePrompt', 'vim' },
|
||||
})
|
||||
|
||||
require('nvim-autopairs.completion.cmp').setup({
|
||||
map_cr = true, -- map <CR> on insert mode
|
||||
map_complete = true, -- it will auto insert `(` (map_char) after select function or method item
|
||||
auto_select = true, -- automatically select the first item
|
||||
insert = false, -- use insert confirm behavior instead of replace
|
||||
map_char = { -- modifies the function or method delimiter by filetypes
|
||||
all = '(',
|
||||
tex = '{',
|
||||
},
|
||||
})
|
||||
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
||||
|
||||
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
|
||||
|
|
Loading…
Add table
Reference in a new issue