29 lines
583 B
Lua
29 lines
583 B
Lua
|
local M = {
|
||
|
'windwp/nvim-autopairs',
|
||
|
event = 'InsertEnter'
|
||
|
}
|
||
|
|
||
|
function M.config()
|
||
|
local npairs = require 'nvim-autopairs'
|
||
|
|
||
|
npairs.setup {
|
||
|
check_ts = true, -- treesitter integration
|
||
|
fast_wrap = {
|
||
|
map = '<C-e>',
|
||
|
highlight = 'Search',
|
||
|
highlight_grey = 'Comment',
|
||
|
},
|
||
|
map_c_w = true,
|
||
|
-- disable_filetype = { "TelescopePrompt" },
|
||
|
}
|
||
|
|
||
|
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
|
||
|
local cmp_status_ok, cmp = pcall(require, 'cmp')
|
||
|
if not cmp_status_ok then
|
||
|
return
|
||
|
end
|
||
|
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done {})
|
||
|
end
|
||
|
|
||
|
return M
|