merge: develop <--- fix/coc-confirm-on-enter

* HEAD
| \
| * 1222c11 <github@luxolus.com> nvim/plug/coc: use <C-Space> instead of <CR> for pum inserts
| /
| develop

Signed-off-by: Bazaah <github@luxolus.com>
This commit is contained in:
Paul Stemmet 2022-08-30 13:40:34 +00:00
commit 47e1dc2dd6
Signed by: Paul Stemmet
GPG Key ID: EDEA539F594E7E75
1 changed files with 1 additions and 5 deletions

View File

@ -44,11 +44,7 @@ return function()
-- Make <CR> to accept selected completion item or notify coc.nvim to format
-- <C-g>u breaks current undo, please make your own choice.
vimp.inoremap({'silent', 'expr'}, '<CR>', [[coc#pum#visible() ? coc#pum#confirm() : "\<C-g>u\<CR>\<C-r>=coc#on_enter()\<CR>"]])
-- Use <c-space> to confirm completion
-- <c-space> could be remapped by other vim plugin, try `:verbose imap <CR>`.
vimp.inoremap({'silent', 'expr'}, '<C-Space>', [[coc#refresh()]])
vimp.inoremap({'silent', 'expr'}, '<C-Space>', [[coc#pum#visible() ? coc#pum#confirm() : "\<C-g>u\<CR>\<C-r>=coc#on_enter()\<CR>"]])
-- Use `[g` and `]g` to navigate diagnostics
vimp.nmap({'silent'}, '[g', '<Plug>(coc-diagnostic-prev)')