diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index ac954d4..f958e23 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -72,6 +72,7 @@ M.plugins = { vim_matchup = true, -- % operator enhancements cmp = true, nvimtree = true, + autopairs = true, }, options = { lspconfig = { diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 0705a86..5e36288 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -10,6 +10,9 @@ M.autopairs = function() end 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, diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 52ccef4..02389b2 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -204,7 +204,7 @@ return packer.startup(function() -- misc plugins use { "windwp/nvim-autopairs", - disable = not status.cmp, + disable = not status.autopairs, after = "nvim-cmp", config = override_req("nvim_autopairs", "(plugins.configs.others).autopairs()"), }