refactor: moved function for conciseness
This commit is contained in:
@@ -1,14 +1,21 @@
|
||||
return {
|
||||
'windwp/nvim-autopairs',
|
||||
config = true,
|
||||
event = { 'InsertEnter' },
|
||||
dependencies = {
|
||||
'hrsh7th/nvim-cmp',
|
||||
},
|
||||
opts = {
|
||||
check_ts = true,
|
||||
map_cr = false,
|
||||
map_bs = true,
|
||||
map_c_h = true, -- <C-h> deletes a pair
|
||||
map_c_w = true, -- <C-w> delete pair if possible
|
||||
},
|
||||
opts = function(_, opts)
|
||||
local autopairs = require('nvim-autopairs.completion.cmp')
|
||||
local cmp = require('cmp')
|
||||
|
||||
opts.fast_wrap = {}
|
||||
opts.check_ts = true
|
||||
opts.map_cr = true
|
||||
opts.map_bs = true
|
||||
opts.map_c_h = false
|
||||
opts.map_c_w = false
|
||||
|
||||
cmp.event:on('confirm_done', autopairs.on_confirm_done())
|
||||
end,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user