You are not logged in.
After a system update neovim started throwing errors on load. Only just had a chance to look into it and it looks like neovim 0.10.0 was released a couple of weeks ago so I'm assuming it's possibly related to that.
I was using LazyVim so thought that might have been the issue but after moving my .config/nvim to .config/nvim.bak and reloading I get the following error when using the `nvim` command (no file specified):
Error detected while processing /usr/share/vim/vimfiles/plugin/black.vim[22]../usr/share/nvim/runtime/autoload/provider/python3.vim:
line 13:
E5108: Error executing lua [string "v:lua"]:1: attempt to index field 'provider' (a nil value)
stack traceback:
[string "v:lua"]:1: in main chunk
Error detected while processing BufWinEnter Autocommands for "*":
E216: No such group or event: SafeState * ++once call s:Highlight_Matching_Pair()when trying to edit a new config with `nvim .config/nvim/init.lua` I get:
Error detected while processing /usr/share/vim/vimfiles/plugin/black.vim[22]../usr/share/nvim/runtime/autoload/provider/python3.vim:
line 13:
E5108: Error executing lua [string "v:lua"]:1: attempt to index field 'provider' (a nil value)
stack traceback:
[string "v:lua"]:1: in main chunk
Error detected while processing BufReadPost Autocommands for "*":
Error executing lua callback: /usr/share/nvim/runtime/filetype.lua:35: Error executing lua: /usr/share/nvim/runtime/filetype.lua:36: BufReadPost Autocommands for "*"..File
Type Autocommands for "*"..function <SNR>1_LoadFTPlugin, line 20: Vim(execute):E15: Invalid expression: $'runtime! ftplugin/{name}[.]{{vim,lua}} ftplugin/{name}_*.{{vim,lu
a}} ftplugin/{name}/*.{{vim,lua}}'
stack traceback:
[C]: in function 'nvim_cmd'
/usr/share/nvim/runtime/filetype.lua:36: in function </usr/share/nvim/runtime/filetype.lua:35>
[C]: in function 'nvim_buf_call'
/usr/share/nvim/runtime/filetype.lua:35: in function </usr/share/nvim/runtime/filetype.lua:10>
stack traceback:
[C]: in function 'nvim_buf_call'
/usr/share/nvim/runtime/filetype.lua:35: in function </usr/share/nvim/runtime/filetype.lua:10>
Error detected while processing BufWinEnter Autocommands for "*":
E216: No such group or event: SafeState * ++once call s:Highlight_Matching_Pair()And when running `:checkhealth` i get:
E5009: Invalid $VIMRUNTIME: /usr/share/nvim/runtimeRunning with `nvim -u NONE` gives no errors.
Looking at `/usr/share/nvim/runtime` this appears to be managed by the `neovim` package as running `pacman -Rs neovim` removes it's contents entirely.
So without a user config the system provided config seems to be broken by default and adding a user config to `.config/nvim` seems to be affected by the broken system config.
I have uninstalled/reinstalled the `neovim` package to no avail (which removes/reinstalls all files in `/usr/share/neovim`)
Can anyone point me in the right direction to resolve this? Or what to look into.
Thanks in advance.
Last edited by twiglet (2024-05-29 09:49:07)
Offline
Solved this, apparently I had accidentally copied the 0.9.x nvim binary to /usr/bin/vi instead of linking it at some point.
Offline
Hi twiglet, I have the same issue has you, even with no config and reinstalling changes nothing. I have this issue for a long time, since 0.10 release but have ignored it so far as I didn't found a solution. As it's quit annoying I decided to solve it for good.
An exact match for "Error detected while processing /usr/share/vim/vimfiles/plugin/black.vim[22]../usr/share/nvim/runtime/autoload/provider/python3.vim:" gives only this post. But I don't understand how you solved it. In my case I didn't copied nvim binary somewhere else.
Error when launching neovim:
Error detected while processing /usr/share/vim/vimfiles/plugin/black.vim[22]../usr/share/nvim/runtime/autoload/provider/python3.vim:
line 13:
E5108: Error executing lua /usr/share/nvim/runtime/lua/vim/version.lua:177: attempt to index local 'version' (a nil value)
stack traceback:
/usr/share/nvim/runtime/lua/vim/version.lua:177: in function '_version'
/usr/share/nvim/runtime/lua/vim/version.lua:379: in function 'cmp'
/usr/share/nvim/runtime/lua/vim/version.lua:411: in function 'lt'
/usr/share/nvim/runtime/lua/vim/provider/python.lua:50: in function 'check_for_module'
/usr/share/nvim/runtime/lua/vim/provider/python.lua:89: in function </usr/share/nvim/runtime/lua/vim/provider/python.lua:80>But what's weird is when I run :checkhealth command, the python language detection part totally fails, with the same error.
provider.python: require("provider.python.health").check()
Python 3 provider (optional)
- ERROR Failed to run healthcheck for "provider.python" plugin. Exception:
/usr/share/nvim/runtime/lua/vim/version.lua:177: attempt to index local 'version' (a nil value)But the first error may help more as it's talking about a plugin in /usr/share/vim/. With pacman -Ql neovim | less, we can see the neovim package deploys a bunch of files, mainly under `/usr/share/nvim/`, but also at the end an empty `/usr/share/vim/`. So neovim packages should owns nothing under /usr/share/vim/. I have uninstalled vi and vim packages but I still have a bunch of files under /usr/share/vim/ including the black.vim plugin that makes neovim complaining.
➜ tree /usr/share/vim/
/usr/share/vim/
└── vimfiles
├── autoload
│ └── black.vim
├── doc
│ ├── fzf.txt
│ └── tags
├── ftdetect
│ ├── PKGBUILD.vim
│ └── SRCINFO.vim
├── ftplugin
│ └── PKGBUILD.vim
├── indent
│ └── cmake.vim
├── plugin
│ ├── black.vim
│ ├── fzf.vim
│ └── redact_pass.vim
└── syntax
├── cmake.vim
├── HGAnnotate.vim
├── ninja.vim
├── PKGBUILD.vim
├── proto.vim
└── SRCINFO.vimI seems this plugin is deployed by the ArchLinux package python-black
➜ sudo pacman -Fy /usr/share/vim/vimfiles/autoload/black.vim
:: Synchronizing package databases...
core 1103,8 KiB 518 KiB/s 00:02 [##############################################################################] 100%
extra 39,1 MiB 1490 KiB/s 00:27 [##############################################################################] 100%
usr/share/vim/vimfiles/autoload/black.vim is owned by extra/python-black 24.4.2-2And indeed, when I remove python-black package I no longer have the issue with neovim.
Finally I solved the cause myself, Rubber duck debugging. Posting it here for future people. Also, I'll open an issue on AL tracker.
Last edited by noraj2 (2024-08-01 22:13:57)
Offline