Shougo / deoplete.nvim

:stars: Dark powered asynchronous completion framework for neovim/Vim8
Other
5.94k stars 295 forks source link

deoplete won't start in vim8 #673

Closed shibumi closed 6 years ago

shibumi commented 6 years ago

Warning: I will close the issue without the minimal init.vim and the reproduction instructions.

Problems summary

let g:deoplete#enable_at_startup = 1 won't work on vim8 startup and vim8 will throw errors:

[vim-hug-neovim-rpc] Vim(pythonx):Traceback (most recent call last):
Error detected while processing function deoplete#enable[1]..deoplete#initialize[1]..deoplete#init#_initialize[17]..deoplete#init#_variables[12]..neovim_rpc#se
rveraddr:
line   15:
E605: Exception not caught: [vim-hug-neovim-rpc] requires `:pythonx import neovim` command to work
Press ENTER or type command to continue
Error detected while processing function deoplete#enable[1]..deoplete#initialize[1]..deoplete#init#_initialize[17]..deoplete#init#_variables[12]..neovim_rpc#se
rveraddr[15]..<SNR>106_on_stderr_vim:
line    3:
E906: not an open channel

Expected

deoplete should work in vim8

Environment Information

Provide a minimal init.vim/vimrc with less than 50 lines (Required!)

if &compatible
  set nocompatible
endif
if !exists($HOME)
    let $HOME=expand('~')
endif
let s:dein_base = $HOME . '/.vim/bundles'
let s:dein_repo_url = 'https://github.com/Shougo/dein.vim'
let s:dein_repo_path = s:dein_base . '/repos/github.com/Shougo/dein.vim'
let &runtimepath.=','.s:dein_repo_path

try
    if dein#load_state(s:dein_base)
      call dein#begin(s:dein_base)

      call dein#add(s:dein_repo_path)
      call dein#add('Shougo/deoplete.nvim')
      call dein#add('Shougo/denite.nvim')
      call dein#add('Shougo/neopairs.vim')
      call dein#add('tpope/vim-fugitive')
      call dein#add('w0rp/ale')
      call dein#add('airblade/vim-gitgutter')
      call dein#add('vim-airline/vim-airline')
      call dein#add('vim-airline/vim-airline-themes')
      call dein#add('tpope/vim-surround')
      call dein#add('tpope/vim-commentary')
      call dein#add('junegunn/vim-easy-align')
      call dein#add('pearofducks/ansible-vim')
      call dein#add('chriskempson/base16-vim')
      if !has('nvim')
        call dein#add('roxma/nvim-yarp')
        call dein#add('roxma/vim-hug-neovim-rpc')
      endif
      call dein#end()
      call dein#save_state()
    endif
catch /E117:/
    execute "silent !git clone" s:dein_repo_url s:dein_repo_path
    quit
endtry
if dein #tap('deoplete.nvim')
    let g:deoplete#enable_at_startup = 1
endif

The reproduce ways from neovim/Vim starting (Required!)

  1. Use my vimrc to install the plugins.
  2. Start vim with my vimrc and you will see the errors

Generate a logfile if appropriate


[vim-hug-neovim-rpc] Vim(pythonx):Traceback (most recent call last):
Error detected while processing function deoplete#enable[1]..deoplete#initialize[1]..deoplete#init#_initialize[17]..deoplete#init#_variables[12]..neovim_rpc#se
rveraddr:
line   15:
E605: Exception not caught: [vim-hug-neovim-rpc] requires `:pythonx import neovim` command to work
Press ENTER or type command to continue
Error detected while processing function deoplete#enable[1]..deoplete#initialize[1]..deoplete#init#_initialize[17]..deoplete#init#_variables[12]..neovim_rpc#se
rveraddr[15]..<SNR>106_on_stderr_vim:
line    3:
E906: not an open channel

Screen shot (if possible)

shibumi commented 6 years ago

Sorry to bother you. Found the issue.. I forgot to install python3-neovim. Works like a charme! Thx!

Shougo commented 6 years ago

Please read the error message...

E605: Exception not caught: [vim-hug-neovim-rpc] requires `:pythonx import neovim` command to work
joaoponceleao commented 4 years ago

Mac (and presumably linuxbrew) users.

As of May 2020 homebrew's vim is now linking to a keg-only unlinked python@3.8, so this problem will re-occur.

See https://github.com/roxma/vim-hug-neovim-rpc/issues/47#issuecomment-622954462 and https://github.com/roxma/vim-hug-neovim-rpc/issues/47#issuecomment-624548838 for workarounds.

Degete commented 4 years ago

It seems that on the new version pythonx is using the version 3.9 by default, which is a dependency.

If your python/pip version is using an older version (<3.9) and you install pyenv on them, it won't find it because it's looking for it on the site-packages of the 3.9.

The solution could be to change the default version, but if you want to keep using 3.8 or older version, you can just install pynvim on the 3.9 with the following command.

/usr/local/opt/python@3.9/bin/pip3 install pynvim