From 068ae08f6c6ad28cf09ac278cba5c4d6fcfd84d7 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 22 Oct 2021 05:47:35 +0530 Subject: [PATCH] avoid using cmp disable var for autopairs (#567) --- lua/core/default_config.lua | 1 + lua/plugins/configs/others.lua | 3 +++ lua/plugins/init.lua | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) 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()"), }