fix(nvim): use coc#pum API for Enter confirmation

pumvisible() checks the native Vim pum, which coc.nvim bypasses in
favour of its own popup — so the confirm never fired. Switch to
coc#pum#visible() / coc#pum#confirm() to match the Tab/S-Tab bindings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
The_miro 2026-05-19 18:25:30 +02:00
parent 7fe95c8b72
commit a8e9a4b49b
1 changed files with 2 additions and 2 deletions

View File

@ -140,5 +140,5 @@ end, { expr = true, silent = true })
-- CR confirms CoC selection -- CR confirms CoC selection
vim.keymap.set("i", "<CR>", function() vim.keymap.set("i", "<CR>", function()
return vim.fn.pumvisible() == 1 and "<C-Y>" or "<CR>" return vim.fn["coc#pum#visible"]() == 1 and vim.fn["coc#pum#confirm"]() or "<CR>"
end, { expr = true }) end, { expr = true, silent = true })