neoclide / coc-tabnine

Tabnine integration of coc.nvim
468 stars 18 forks source link

Imcomplete completion #15

Closed peng1999 closed 5 years ago

peng1999 commented 5 years ago

Sometimes tabnine gives the completion of a whole sentence, but coc only completes the first word of it. 批注 2019-08-09 102944

bfulop commented 5 years ago

I have the same issue. As a temporary workaround, I noticed that if I select another completion, then move back to the one I want to expand, and then hit the DEL key, the whole sentence is inserted.

chemzqm commented 5 years ago

You have to confirm completion,since it's snippet

bfulop commented 5 years ago

@chemzqm, sorry for asking the obvious but how do you confirm the completion?

If I press enter, it adds a new line...

bfulop commented 5 years ago

Ah I guess it's

inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm() : 
                                           \"\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"

from Snippet completion readme

or just simply <C-y>

chemzqm commented 5 years ago

It's documented in wiki