diff options
Diffstat (limited to 'lua/core/autopairs.lua')
-rw-r--r-- | lua/core/autopairs.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lua/core/autopairs.lua b/lua/core/autopairs.lua index f0111db6..a5f21a1b 100644 --- a/lua/core/autopairs.lua +++ b/lua/core/autopairs.lua @@ -1,8 +1,10 @@ -- if not package.loaded['nvim-autopairs'] then -- return -- end +local Log = require "core.log" local status_ok, _ = pcall(require, "nvim-autopairs") if not status_ok then + Log:get_default().error "Failed to load autopairs" return end local npairs = require "nvim-autopairs" @@ -25,9 +27,10 @@ MUtils.completion_confirm = function() end if package.loaded["compe"] then + local map_complete_optional = vim.bo.filetype ~= "tex" require("nvim-autopairs.completion.compe").setup { map_cr = true, -- map <CR> on insert mode - map_complete = true, -- it will auto insert `(` after select function or method item + map_complete = map_complete_optional, -- it will auto insert `(` after select function or method item } end |