Closed jsfaint closed 7 years ago
I checked neovim_rpc_server_api_info.py, nvim_get_option was defined, but not implemented. I add the implement in neovim_rpc_methods.py and it works as expected.
I have only implemented a minimal set of api for NCM. You could creat PR for this use case.
On neovim, the import vim
is basicly an attached neovim client, which is:
import neovim
vim = neovim.attach(...)
It seems possible to make import vim
works in your case, with some sort of magic (I've never done that), https://stackoverflow.com/questions/3799545/dynamically-importing-python-module.
But it is not necessary, with NCM source, you should use the self.nvim
object. For more vim objects creation for multi-threading, you could use the neovim module to attach a new connection.
Thanks @roxma , you are so kind~
I use
nvim.options['ignorecase']
to check vim option, it works in neovim, but fail to work in vim8.The log says
nvim_get_options
was not implementedI checked
neovim_rpc_server_api_info.py
,nvim_get_option
was defined, but not implemented. I add the implement inneovim_rpc_methods.py
and it works as expected.I'm a little curious about the difference of nvim/vim python client.
This snippet works on both neovim and vim with
:py3file
But when I add
import vim
to my plugin, it reported No module named 'vim'Does anyone know the difference? Thanks