From 6d3d680158bae4f547d24d42c579f1fc5a8a218d Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Thu, 13 Jul 2023 14:54:42 +0200 Subject: [PATCH] fix autopairs completion --- home/.config/nvim/autopairs.vim | 4 ++++ home/.config/nvim/plugs.vim | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/home/.config/nvim/autopairs.vim b/home/.config/nvim/autopairs.vim index c62191c..e10220e 100644 --- a/home/.config/nvim/autopairs.vim +++ b/home/.config/nvim/autopairs.vim @@ -4,3 +4,7 @@ local Rule = require('nvim-autopairs.rule') local npairs = require('nvim-autopairs') npairs.add_rule(Rule("<>","<>","rs")) EOF + +" fix being not usable to select a completion item +inoremap coc#pum#visible() ? coc#pum#confirm() : + \ "\u\=v:lua.require'nvim-autopairs'.autopairs_cr()\" diff --git a/home/.config/nvim/plugs.vim b/home/.config/nvim/plugs.vim index 60c387a..ce691fd 100644 --- a/home/.config/nvim/plugs.vim +++ b/home/.config/nvim/plugs.vim @@ -26,7 +26,3 @@ Plug 'lambdalisue/suda.vim' "Plug 'dense-analysis/ale' call plug#end() - -lua << EOF -require("nvim-autopairs").setup {} -EOF