From 1222c115c986f62fb542d43bafb51abd8124f970 Mon Sep 17 00:00:00 2001 From: Bazaah Date: Tue, 30 Aug 2022 13:37:01 +0000 Subject: [PATCH] nvim/plug/coc: use instead of for pum inserts Unfortunately pear-tree seems to conflict with coc in utilizing (enter). Also the previous function assigned to wasn't very useful (triggering autocompletion menu) as already handles that. --- nvim/lua/psoxizsh/plugins/config/coc.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/nvim/lua/psoxizsh/plugins/config/coc.lua b/nvim/lua/psoxizsh/plugins/config/coc.lua index fed6586..4fa0012 100644 --- a/nvim/lua/psoxizsh/plugins/config/coc.lua +++ b/nvim/lua/psoxizsh/plugins/config/coc.lua @@ -44,11 +44,7 @@ return function() -- Make to accept selected completion item or notify coc.nvim to format -- u breaks current undo, please make your own choice. - vimp.inoremap({'silent', 'expr'}, '', [[coc#pum#visible() ? coc#pum#confirm() : "\u\\=coc#on_enter()\"]]) - - -- Use to confirm completion - -- could be remapped by other vim plugin, try `:verbose imap `. - vimp.inoremap({'silent', 'expr'}, '', [[coc#refresh()]]) + vimp.inoremap({'silent', 'expr'}, '', [[coc#pum#visible() ? coc#pum#confirm() : "\u\\=coc#on_enter()\"]]) -- Use `[g` and `]g` to navigate diagnostics vimp.nmap({'silent'}, '[g', '(coc-diagnostic-prev)')