Closed crowdigit closed 7 months ago
Thank you for the feedback and sorry for the late response. I had some hard time to install neovim on my ubuntu system, because of some incompatible dependencies in some python modules. After that I was unable to successfully install and configure minpac, maybe I did not fully understand all the steps you described. I don't have $XDG_CONFIG_HOME, so maybe I used the wrong directory, I don't know. At the end minpac compained about missing minpac#impl#update()
that I was unable to find.
Is it possible that the issue can be reproduced without minpac and maybe just manually executing syntax on
? Or do we really need to have a package manager? Is it really the syntax on
line in the config that is causing the problem?
TBH I'm clueless. The error message you pasted here says that the python functions defined in swank.py
are missing. This was called from SlimvConnectSwank()
, but this function starts by first loading the python module, if script variable s:python_initialized
is zero. So the python module initialization could in theory be skipped only if this script variable is already nozero. But whenever we source slimv.vim
, this variable is cleared and set only after the python module is initialized. This is very strange.
Strange, I tried to reproduce the error without package manager, following :help
.
export NVIM_APPNAME=nvim-test
mkdir ~/.local/share/"${NVIM_APPNAME}"/site/plugin
mv ~/Downloads/slimv-master ~/.local/share/"${NVIM_APPNAME}"/site/plugin/slimv
ls ~/.local/share/"${NVIM_APPNAME}"/site/plugin/slimv
# doc ftdetect ftplugin indent plugin README.txt slime swank-clojure syntax
Error detected while processing /home/asdf/.local/share/nvim-test/site/plugin/slimv/ftplugin/clojure/slimv-clojure.vim:
line 198:
E117: Unknown function: SlimvInitBuffer
Now another error occurs :thinking:, It happened with empty vimrc (init.vim
)
cat ~/.config/nvim-test/init.vim
# " syntax on
My :checkhealth
reports it has python3 enabled. And I thought syntax on
was corrupting because without it, this error does not occur.
One more thing to note is, opening empty buffer and then opening lisp source does not issues the error. But only when nvim
is executed with filename on command line. e.g.
# no error
nvim
# open file with :e
# ,C
# error occurs
nvim ./foo.lisp
# ,C
I'm not familiar with neovim, but I suppose it uses a directory structure similar to vim. In vim user vim files are usually located in ~/.vim in subdirectories like autoload, ftplugin, indent, plugin, syntax, etc. The slimv package also contains the same directory structure, which means that files in slimv/ftplugin should go into into ~/.vim/ftplugin, files in slimv/plugin should to into ~/vim/plugin, etc. You cannot put everything into e.g. ~/.vim/slimv subdirectory, because then vim would not find the proper files (vim searches for the ftplugin files in ~/.vim/ftplugin).
I assume that you have just put everything into a slimv subdirectory, and maybe that is why neovim does not find some of the files. But I'm just guessing, as I said, I'm not familiar with neovim, nor with the plugin managers in neovim.
I suggest that first you try to follow the basic logic for placing the plugin files, as described above or in the documentation, and check that you still have such issues that some of the scripts are not found/not loaded.
I think this issue is invalid. Since it only happens in non-standard vim and it is easy to work around and does not worth the effort to fix it.
I've been tumbling these days 😅, I couldn't afford time. I wanted to setup plugin in plain Vim way and reproduce the error, unfortunately it was too long times ago I setup Vim in the standard way.
Closing this issue due to being stale, invalid. I don't want to leave clutters on something I enjoy using.
I ran into the same problem - for me it was unrelated of any syntax setting or empty/non-empty buffer. It turned out my system upgrade resulted in a missing neovim python package, leading to the python code failing and the variable being undefined.
To make sure it's set up correctly, check if the neovim
package is installed, and also :checkhealth
will tell you if there are any issues with the python setup in neovim
Description
Connecting to SWANK with setting
syntax on
in Neovim causes error (see below logs).How to Reproduce
Edit Neovim config, here's minimal reproducible config
After sourcing them, install packages by executing
:call minpac#update()
<C-,>
Comment
Executing
syntax on
on Neovim, actually does source syntax files as per their documentation.This issue is not critical because Neovim enables syntax highlight by default. Weird though, what it does is sourcing syntax files (again I guess). I was unable to reproduce it with Vim.
Output