|
|
|
@ -3,7 +3,7 @@ local M = {}
|
|
|
|
|
local chadrc_config = require("core.utils").load_config()
|
|
|
|
|
M.autopairs = function()
|
|
|
|
|
local present1, autopairs = pcall(require, "nvim-autopairs")
|
|
|
|
|
local present2, autopairs_completion = pcall(require, "nvim-autopairs.completion.cmp")
|
|
|
|
|
local present2, cmp_autopairs = pcall(require, "nvim-autopairs.completion.cmp")
|
|
|
|
|
|
|
|
|
|
if not (present1 or present2) then
|
|
|
|
|
return
|
|
|
|
@ -12,11 +12,8 @@ M.autopairs = function()
|
|
|
|
|
autopairs.setup()
|
|
|
|
|
|
|
|
|
|
-- not needed if you disable cmp, the above var related to cmp tooo! override default config for autopairs
|
|
|
|
|
|
|
|
|
|
autopairs_completion.setup {
|
|
|
|
|
map_complete = true, -- insert () func completion
|
|
|
|
|
map_cr = true,
|
|
|
|
|
}
|
|
|
|
|
local cmp = require "cmp"
|
|
|
|
|
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
M.better_escape = function()
|
|
|
|
|