You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that the commands work just fine, it is the autocmds that fail.
Traceback
When I try to run :tabnew, triggering the autocmd, I get the following stack trace:
Error detected while processing function remote#define#request:
line 2:
error caught in request handler '/home/user/.config/nvim/rplugin/python3/terminalctl.py:autocmd:TabNew:* []'
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pynvim/plugin/host.py", line 129, in _on_request
rv = handler(*args)
File "/usr/local/lib/python3.8/site-packages/pynvim/plugin/host.py", line 95, in _wrap_delayed_function
self._request_handlers[name](*args)
KeyError: '/home/user/.config/nvim/rplugin/python3/terminalctl.py:autocmd:TabNew:*'
Error invoking '/home/user/.config/nvim/rplugin/python3/terminalctl.py:autocmd:TabNew:*' on channel 4 (python3-rplugin-host):
KeyError('/home/user/.config/nvim/rplugin/python3/terminalctl.py:autocmd:TabNew:*')
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pynvim/msgpack_rpc/session.py", line 200, in handler
rv = self._request_cb(name, args)
File "/usr/local/lib/python3.8/site-packages/pynvim/api/nvim.py", line 210, in filter_request_cb
result = request_cb(name, args)
File "/usr/local/lib/python3.8/site-packages/pynvim/plugin/host.py", line 129, in _on_request
rv = handler(*args)
File "/usr/local/lib/python3.8/site-packages/pynvim/plugin/host.py", line 95, in _wrap_delayed_function
self._request_handlers[name](*args)
so we are getting a KeyError for /home/user/.config/nvim/rplugin/python3/terminalctl.py:autocmd:TabNew:* in the file /usr/local/lib/python3.8/site-packages/pynvim/plugin/host.py on line 95. If I open this file, I can do something like:
Problem
I'm trying to use an
autocmd
via the remote-plugin documentation, and running into errors.$ python -V Python 3.8.6 $ pip -V pip 19.3.1 from /usr/lib/python3.8/site-packages/pip (python 3.8) $ pip list installed | grep -i pynvim pynvim 0.4.2 $ nvim --version NVIM v0.5.0-812-gd17e50879 Build type: RelWithDebInfo LuaJIT 2.1.0-beta3 Compilation: /usr/bin/gcc-5 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/travis/build/neovim/bot-ci/build/neovim/build/config -I/home/travis/build/neovim/bot-ci/build/neovim/src -I/home/travis/build/neovim/bot-ci/build/neovim/.deps/usr/include -I/usr/include -I/home/travis/build/neovim/bot-ci/build/neovim/build/src/nvim/auto -I/home/travis/build/neovim/bot-ci/build/neovim/build/include Compiled by travis@travis-job-317a2489-aba5-414a-b9f3-9551746c326c
Setup
Looking at the generated manifest file
/home/user/.local/share/nvim/rplugin.vim
:and then loading up a
~/.config/nvim/init.vim
which only contains:and the relevant parts of
/home/user/.config/nvim/rplugin/python3/terminalctl.py
:which is a pretty simplistic example. We can also see that Neovim recognizes the
autocmd
internally:Note that the commands work just fine, it is the autocmds that fail.
Traceback
When I try to run
:tabnew
, triggering theautocmd
, I get the following stack trace:so we are getting a
KeyError
for/home/user/.config/nvim/rplugin/python3/terminalctl.py:autocmd:TabNew:*
in the file/usr/local/lib/python3.8/site-packages/pynvim/plugin/host.py
on line95
. If I open this file, I can do something like:which will then write the string to
/home/user/foo
, opening it:so we can see that the
autocmd
just isn't stored. I can change the decorator to specifysync=False
, and see the same thing, but a different flavor:Fin
So what am I missing here?
The text was updated successfully, but these errors were encountered: