roxma / vim-hug-neovim-rpc

EXPERIMENTAL
MIT License
218 stars 28 forks source link

Get errors in vim8 #14

Closed SpaceVimBot closed 6 years ago

SpaceVimBot commented 6 years ago

Messages maintainer: Bram Moolenaar <Bram@vim.org>
Error detected while processing function HandleBufReadPost[1]..yarp#core#notify[1]..yarp#core#wait_channel[5]..yarp#core#jobstart[2]..yarp#pyx#init[13]..yarp#core#serveraddr[1]..neovim_rpc#serveraddr:
line   15:
E605: Exception not caught: [vim-hug-neovim-rpc] requires `:pythonx import neovim` command to work
Error detected while processing function HandleBufReadPost[1]..yarp#core#notify[1]..yarp#core#wait_channel[5]..yarp#core#jobstart:
line    2:
E171: Missing :endif
Error detected while processing function HandleBufReadPost[1]..yarp#core#notify[1]..yarp#core#wait_channel:
line    5:
E171: Missing :endif

in neovim has('python') and has('python3') both return 1, and I install the client via pip install --user neovim and pip3 install --user neovim.

this plugin use pythonx by default, I think it will cause some issue:

if has('pythonx')
    let s:py = 'pythonx'
    let s:pyeval = function('pyxeval')
elseif has('python3')
    let s:py = 'python3'
    let s:pyeval = function('py3eval')
else
    let s:py = 'python'
    let s:pyeval = function('pyeval')
endif

in my pc, has('pythonx') return 1, and pyxversion=3 bydefault, then I can not use python2 remote plugin, BTW, if I want to use python2 remote plugin and python3 remote plugin at the same time, how should I do?

I will try to fix this issue, and send some PRs. test will be done in https://github.com/SpaceVim/SpaceVim/pull/994

SpaceVimBot commented 6 years ago

I just test python import neovim and python3 import neovim in neovim or in terminal, both of them work well

wsdjeg@archlinux:~$ python
Python 3.6.3 (default, Oct 24 2017, 14:48:20) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import neovim
>>> 
wsdjeg@archlinux:~$ python2
Python 2.7.14 (default, Sep 20 2017, 01:25:59) 
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import neovim
>>> 
roxma commented 6 years ago

in my pc, has('pythonx') return 1, and pyxversion=3 bydefault, then I can not use python2 remote plugin, BTW, if I want to use python2 remote plugin and python3 remote plugin at the same time, how should I do?

I don't think pyxversion=3 stops you from using python2 remote plugin. Remote plugins are running as standalone processes. Vim's python binding is only used for vim-hug-neovim-rpc itself. They are different things.

E605: Exception not caught: [vim-hug-neovim-rpc] requires `:pythonx import neovim` command to work

As the message says, you need to test :pythonx import neovim on vim8, not on neovim.