This is simple, let me explain. <CR> will confirm completion from coc if there is a completion list, when there is no coc completion visible, and try to accept the copilot suggestions.
The problem is sometimes, when I input very quickly, and I press enter, this may confirm the coc completion. So I set noselect in coc-settings.json, but I must press <CR> twice to input a new line when there is a coc completion list.
Preferred Solution
Solution can be a new api for check if there is a selection of the coc completion, may be coc#pum#has_item_selected() or something like this to check if there is one selected item in the list. With this, I can simply update my mapping command with this below (after this, I only need press <cr> once to input a new line with noselect=true):
Problem
I use this command to map my
<CR>
:This is simple, let me explain.
<CR>
will confirm completion fromcoc
if there is a completion list, when there is nococ
completion visible, and try to accept thecopilot
suggestions.The problem is sometimes, when I input very quickly, and I press enter, this may confirm the
coc
completion. So I setnoselect
incoc-settings.json
, but I must press<CR>
twice to input a new line when there is acoc
completion list.Preferred Solution
Solution can be a new api for check if there is a selection of the
coc
completion, may becoc#pum#has_item_selected()
or something like this to check if there is one selected item in the list. With this, I can simply update my mapping command with this below (after this, I only need press<cr>
once to input a new line withnoselect=true
):Is this possible to be implemented?