-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
autocmd KeyError #467
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: