Languageclient-neovim: LC hangs when used with deoplete using any lang server

Created on 21 Sep 2019  ·  12Comments  ·  Source: autozimu/LanguageClient-neovim

  • Did you upgrade to latest plugin version?
    yes
  • Did you upgrade to/compile latest binary? Run shell command
    bin/languageclient --version to get its version number.

  • (Neovim users only) Did you check output of :checkhealth LanguageClient?
    yes

  • Did you check [troubleshooting]?
    yes

    Describe the bug

When I type a partial name of a symbol in a file type with a supported language server, the auto complete menu from deoplete doesn't show and the computer fan spins up. I tracked it down to self.vim.command("let {} = []".format(COMPLETE_OUTPUTS)). When I comment out this line, it behaves properly.
It appears that the deoplete gets caught in a loop b/c LC's source never returns any candidates.

Environment

  • neovim/vim version (nvim --version or vim --version):]
    neovim 0.4.2
  • This plugin version (git rev-parse --short HEAD):
    LC: 4fd272b
    deoplete: 9856613
  • This plugin's binary version (bin/languageclient --version):
    languageclient 0.1.154 4fd272b0dbf96d7a4fd5d9d840780638f514aa7c
  • Minimal vimrc content (A minimal vimrc is the smallest vimrc that could
    reproduce the issue. Refer to an example here):
    ```call plug#begin()
    Plug 'autozimu/LanguageClient-neovim', { 'branch': 'next', 'do': 'bash install.sh' }
    Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
    call plug#end()

let g:LanguageClient_serverCommands = { 'swift': ['sourcekit-lsp'] }

let g:deoplete#enable_at_startup = 1
```

  • Language server link and version:
    sourcekit-lsp: /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2019-09-16-a.xctoolchain
    pyls: ?

To Reproduce

Steps to reproduce the behavior:

  1. Create/Fetch example project ...
  2. Start vim, nvim -u min-vimrc.vim ...
  3. Edit a source file where one would expect autocomplete to occur.

Current behavior

Notice: no autocomplete appears and laptop fan spins up

Expected behavior

Deoplete autocomplete menu to appear

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

This occurred after a recent update to both plugins.

Most helpful comment

I have fixed the problem in the latest version of deoplete.
Please update it.

All 12 comments

I'm also experiencing this issue, with both Neovim 0.4.0 and Neovim 0.5.0 (on Linux Mint 19.2).

Although I don't understand the cause, there have been lots of changes to Deoplete's codebase recently. The issue goes away when I pin Deoplete's version to the latest GitHub release/tag. If using minpac, this is done with 'rev':

  call minpac#add('Shougo/deoplete.nvim', {
        \ 'rev': '*',
        \ 'do': 'UpdateRemotePlugins',
        \ })

I think there's an issue with Deoplete's recent updates regarding async operations. If the next stable release is still broken, we can open an issue there.

I'm not sure if its 100% related thing, but I've noticed that deoplete completions from LC stops working on this deoplete commit. I'm not sure who is responsible for this ( LC should adopt or deoplete introduced a regression), but can someone try deoplete commit I've mentioned above and the one before it?

Recently deoplete added some docs that say not to use is_async

is_async        (Bool)
            If the gather is asynchronous, the source must set
            it to "True". A typical strategy for an asynchronous
            gather_candidates method to use this flag is to
            set is_async flag to True while results are being
            produced in the background (optionally, returning them
            as they become ready). Once background processing
            has completed, is_async flag should be set to False
            indicating that this is the last portion of the
            candidates.

            Note: The feature is deprecated and not recommended.
            You should use callback system by
            |deoplete#auto_complete()| instead.

I tried to figure out how auto_complete() works but didn't find much. vim-lsp seems to be using it in their latest releases.

@kchibisov Please test the latest version of deoplete.

@Tylerc230 Yes. is_async is not recommended for plugins.

@Shougo latest master doesn't work for me. Deoplete shows it's own completions, however completions from LC are missing (LC is working, since it's showing error messages an so on).

OK. This is deoplete problem.
I will fix it later.
Please wait.

@Shougo no problem, thx for reply here.

I have fixed the problem in the latest version of deoplete.
Please update it.

The issue should be closed.

Confirmed it works. Thank you !

@Tylerc230 Please close the issue.

Was this page helpful?
0 / 5 - 0 ratings