lifepillar / vim-mucomplete

Chained completion that works the way you want!
MIT License
913 stars 18 forks source link

sometimes hangup when typing in string #152

Closed hushicai closed 5 years ago

hushicai commented 5 years ago

This is a minimal vimrc:

call plug#begin('~/.plugged')
Plug 'lifepillar/vim-mucomplete'
call plug#end()

let g:mucomplete#enable_auto_at_startup = 1
" let g:mucomplete#completion_delay = 1
" let g:mucomplete#no_mappings = 1
set completeopt-=preview
set completeopt+=noselect

mucomplete

As you can see, when i typing test in string, It seams that vim hang up, and i have to force stop with ctrl-c.

If I turn off enable_auto_at_startup, and <tab> in string, vim also hang up.

Maybe there are something wrong when complete in string.

lifepillar commented 5 years ago

That looks like an issue with your omni-completion plugin. Turn off MUcomplete and instead of completing with Tab, use Ctrl-x Ctrl-o. If it still hangs then the issue does not depend on MUcomplete.

With :setl omnifunc? you may see which completion function is called.

hushicai commented 5 years ago

Yes, I use lsp completion from ale, omnifunc is ale#completion#OmniFunc.

Using <c-x><c-o> keep searching for a long time, but it does not block vim, i can continue typing then.

hushicai commented 5 years ago

ale supports ale_completion_enabled option, if i enable ale auto completion, everything is ok.

ale

hushicai commented 5 years ago

It seams that this problem is the same as https://github.com/lifepillar/vim-mucomplete/issues/131#issuecomment-470681826.

tsserver get vim stuck. but flow lsp is ok.

lifepillar commented 5 years ago

Have you tried what the section LanguageClient-neovim in :help mucomplete-compatibility suggests?

hushicai commented 5 years ago

Yes, i read it. But no help for my case. maybe it's due to the 'tsserver'.

lifepillar commented 5 years ago

Ok. You should first make sure that your setup works fine without MUcomplete (using CTRL-X CTRL-O). When it does, MUcomplete should not behave differently. If it does, feel free to reopen this issue.

cherryramatisdev commented 1 year ago

I still have this problem only with mucomplete, anyone has this particular bug?

maybe it's with tsserver, I don't have the same behavior with other LSPs

lifepillar commented 1 year ago

@cherryramatisdev Sorry for the late reply, I've seen this only now. It would help if you could provide more details about how to reproduce your issue, possibly with a minimal example., including your Vim version, OS, terminal (if you are using a terminal), and tsserver setup.