Open entropitor opened 6 years ago
@entropitor Please send minimum init.vim
for test.
If it's possible, would you capture screenshot of completion popup and paste it here ?
I posted an answer yesterday but it apparently didn't get through 😢 Let's try again
call plug#begin('~/.vim/bundle')
Plug 'prabirshrestha/async.vim'
Plug 'prabirshrestha/asyncomplete.vim'
Plug 'yami-beta/asyncomplete-omni.vim'
Plug 'autozimu/LanguageClient-neovim', { 'do': ':UpdateRemotePlugins' }
call plug#end()
let g:asyncomplete_auto_popup = 1
set completeopt+=preview
autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif
au User asyncomplete_setup call asyncomplete#register_source(asyncomplete#sources#omni#get_source_options({
\ 'name': 'omni',
\ 'whitelist': ['*'],
\ 'completor': function('asyncomplete#sources#omni#completor')
\ }))
let g:LanguageClient_serverCommands = {
\ 'javascript': ['flow-language-server', '--stdio'],
\ 'reason': ['ocaml-language-server', '--stdio'],
\ 'ocaml': ['ocaml-language-server', '--stdio']
\ }
let g:LanguageClient_autoStart = 1
Thanks for minimum init.vim
and screenshot !
The completion item by asyncomplete-omni.vim includes [omni]
as follows.
Bug of typed text isn't removed is because of LanguageClient-neovim
overrides popup of asyncomplete.vim.
textDocument_completionOmnifunc()
method trigger neovim's complete()
( :h complete()
).
https://github.com/autozimu/LanguageClient-neovim/blob/master/rplugin/python3/LanguageClient/LanguageClient.py#L1066
It is difficult for asyncomplete-omni.vim to support LanguageClient-neovim
.
So I suggest prabirshrestha/asyncomplete-lsp.vim for language server.
If used together with
flow-language-server
and LanguageClient-neovim, the completion through asyncomplete-omni is bugged, it adds the new insertion but doens't removed the typed text that triggered the insertion in the first placebecomes