From 1394c013a448bb20edcdf1d3824185b6f578c364 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 19 Dec 2021 23:10:38 +0100 Subject: [PATCH] Fixed autoparis warning --- init.lua | 10 ---------- lua/cmp_plug.lua | 2 ++ 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/init.lua b/init.lua index 9d3ca67..d2bb709 100644 --- a/init.lua +++ b/init.lua @@ -159,16 +159,6 @@ require'nvim-treesitter.configs'.setup { require("luasnip.loaders.from_vscode").load() -------------------- AUTOPAIRS ----------------------------- require('nvim-autopairs').setup{} -require("nvim-autopairs.completion.cmp").setup({ - map_cr = true, -- map on insert mode - map_complete = true, -- it will auto insert `(` (map_char) after select function or method item - auto_select = true, -- automatically select the first item - insert = false, -- use insert confirm behavior instead of replace - map_char = { -- modifies the function or method delimiter by filetypes - all = '(', - tex = '{' - } -}) -------------------- FZF NATIVE ---------------------------- require('telescope').load_extension('fzf') -------------------- TERMINAL ------------------------------ diff --git a/lua/cmp_plug.lua b/lua/cmp_plug.lua index 0882f4f..0e5c7c5 100644 --- a/lua/cmp_plug.lua +++ b/lua/cmp_plug.lua @@ -105,6 +105,8 @@ cmp.setup.cmdline(':', { -- map_complete = true, -- auto_select = true --}) +local cmp_autopairs = require('nvim-autopairs.completion.cmp') +cmp.event:on( 'confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = '' } })) -- TabNine --local tabnine = require('cmp_tabnine.config')