vimade
vimade copied to clipboard
Error Installing With Vim-Plug and Neovim - Add better error handling / suggestions / improve docs
I tried installing with Neovim (v0.2.2) and Vim-Plug and got the following error:
Error detected while processing function vimade#Init[2]..vimade#CreateGlobals:
line 21:
E168: :finish used outside of a sourced file
Press ENTER or type command to continue
Then pressing enter leads to a series of undefined variables. I've just included the first few here:
Error detected while processing function vimade#Init[2]..vimade#CreateGlobals:
line 25:
E121: Undefined variable: g:vimade_py_cmd
Error detected while processing function vimade#Init[15]..vimade#CheckWindows:
line 7:
E121: Undefined variable: g:vimade_py_cmd
Error detected while processing function vimade#FocusGained[2]..vimade#InvalidateSigns:
line 6:
E121: Undefined variable: g:vimade_py_cmd
vimade#FocusGained[2]..vimade#InvalidateSigns[11]..vimade#CheckWindows:
line 7:
E121: Undefined variable: g:vimade_py_cmd
Please let me know if there are any other details which could help resolve this.
I figured out that you get this error if the neovim pynvim package cannot be loaded when PlugInstall is run. I just made sure that it was in my path when installing.
I think this is a genuine issue that does need addressing. I just did install as per instructions using NeoVim 0.4.3. and got the same issue.
Thanks for the feedback gents. Makes sense to improve the install instructions to include python/pynvim. Also would be nice to have better error handling for when python is not configured correctly.
I just ran into this as well. For those that like me did not understand the fix proposed above: run :checkhealth
in NeoVim and look for the instructions on installing pynvim
Ran into this when running in a new venv
, might be something we can add to check that there.