ncm2 / ncm2

:heart: Slim, Fast and Hackable Completion Framework for Neovim
MIT License
1.34k stars 42 forks source link

(pumvisible() ? "\o\(pumvisible() ?... #144

Open huyvohcmc opened 5 years ago

huyvohcmc commented 5 years ago

OS

Mac OS 10.14.3

neovim :version output

NVIM v0.3.3

Minimal vimrc for reproducing the issue

let g:python3_host_prog = '/usr/local/bin/python3'
let g:python_host_prog = '/usr/local/bin/python'

call plug#begin('~/.config/nvim/plugged')
Plug 'ncm2/ncm2'
Plug 'ncm2/ncm2-tagprefix'
Plug 'ncm2/ncm2-path'
Plug 'roxma/nvim-yarp'
call plug#end()

" Enable ncm2 for all buffers
autocmd BufEnter * call ncm2#enable_for_buffer()

" When the <Enter> key is pressed while the popup menu is visible, it only
" hides the menu. Use this mapping to close the menu and also start a new line.
inoremap <expr> <CR> (pumvisible() ? "\<c-y>\<cr>" : "\<CR>")

" Use <TAB> to select the popup menu:
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"

neovim :messages output when the error occurs

(pumvisible() ? "\o\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\(pumvisible() ? "\\
...

When I open a .js file and starts to write the code to import some React components my nvim suddenly halt at insert mode. There's nothing I can do to stop it, except for spamming Ctrl C and after a while it did stop halting but the string (pumvisible() above was inserted to the place that is supposed to be the import code.

roxma commented 5 years ago

hmm... cannot reproduce...