Random autocompletion in pop-up menu with lsp when setting "completion_trigger_keyword_length"
- Please read through this section before posting a bug report.
My testing minimal init.vim
" Spelling
set spell spelllang=en_gb
set complete+=kspell
" Completion stuff
set completeopt=menuone,noinsert,longest
set shortmess+=c
let g:completion_trigger_on_delete = 1
let g:completion_trigger_keyword_length = 3
let g:completion_matching_strategy_list = ['exact', 'substring', 'fuzzy']
let g:completion_auto_change_source = 1
let g:completion_chain_complete_list = [
\{'complete_items': ['lsp']},
\{'mode': '<c-p>'},
\{'mode': '<c-n>'}
\]
" Set up auto-completion on every buffer
autocmd BufEnter * lua require'completion'.on_attach()
(The completion list is remnant of my full init when I use lsp, but the issue I am describing persists with this minimal init and no other plugins except completion-nvim. You can try it with or without the nvim-lspconfig plugin)
How to reproduce
Start typing (for example, in a plain text file), after 3 letters the pop-up menu appears, start going down the list with <C-n>. At some random point in time, the thing gets auto-completed where the selections is. (If this does not happen at the first word, continue and try another.) That is, it does not wait until I press <C-y> or let g:completion_trigger_keyword_length = 3, or the \{'complete_items': ['lsp']} this stops happening. Now, the problem is that I do want the lsp completion to happen, so I do not want to remove it.
Expected behavior
I would be expecting that setting g:completion_trigger_keyword_length or having lsp as first completion source would not have any weird buggy effect while at the pop-up menu.
ok, I see no response. I am going to leave this here for posterity, in case someone ever reads it. Anyway, moving on to a different auto-completion plugin.