Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.10.4, Build type: Release
Operating system/version
Debian 13 (x86_64)
Describe the bug
The lazy.nvim during runtime path reset picks nonexistent /usr/lib64/nvim/ path. The real nvim lib path on stock debian (and possibly some other systems) is /usr/lib/nvim/ though.
It leads to nasty error when opening any .lua file or even any :help page (probably not limited to these two) and no highlights (all highlights are working with no lazy's setup() though). Treesitter couldn't find parsers (which really live under /usr/lib/nvim/parser) due to wrong "lib" path.
Error outputs (probably not important)
$ nvim lazy_conf.lua :
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/file
type.lua:36: BufReadPost Autocommands for "*"..FileType Autocommands for "*"..function <SNR>1_LoadFTPlugin[20]..script /
usr/share/nvim/runtime/ftplugin/lua.lua: Vim(runtime):E5113: Error while calling lua chunk: /usr/share/nvim/runtime/lua/
vim/treesitter/language.lua:107: no parser for 'lua' language, see :help treesitter-parsers
stack traceback:
[C]: in function 'error'
/usr/share/nvim/runtime/lua/vim/treesitter/language.lua:107: in function 'add'
/usr/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:111: in function 'new'
/usr/share/nvim/runtime/lua/vim/treesitter.lua:41: in function '_create_parser'
/usr/share/nvim/runtime/lua/vim/treesitter.lua:108: in function 'get_parser'
/usr/share/nvim/runtime/lua/vim/treesitter.lua:416: in function 'start'
/usr/share/nvim/runtime/ftplugin/lua.lua:2: in main chunk
[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_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>
:help nvim :
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/file
type.lua:36: BufReadPost Autocommands for "*"..FileType Autocommands for "*"..function <SNR>1_LoadFTPlugin[20]..script /
usr/share/nvim/runtime/ftplugin/help.lua: Vim(runtime):E5113: Error while calling lua chunk: /usr/share/nvim/runtime/lua
/vim/treesitter/language.lua:107: no parser for 'vimdoc' language, see :help treesitter-parsers
stack traceback:
[C]: in function 'error'
/usr/share/nvim/runtime/lua/vim/treesitter/language.lua:107: in function 'add'
/usr/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:111: in function 'new'
/usr/share/nvim/runtime/lua/vim/treesitter.lua:41: in function '_create_parser'
/usr/share/nvim/runtime/lua/vim/treesitter.lua:108: in function 'get_parser'
/usr/share/nvim/runtime/lua/vim/treesitter.lua:416: in function 'start'
/usr/share/nvim/runtime/ftplugin/help.lua:2: in main chunk
[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_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>
( Seemingly same problem on Ubuntu )
Workaround over issue
require("lazy").setup({
spec = {
...
},
...
-- just turn runtimepath reset off
performance = { rtp = { reset = false } },
})
The code causing it:
lazy/core/config.lua:301
It puts directory into runtimepath without checking whether it exist.
Probable solution is check whether .../lib64/nvim/ extist before put it into runtimepath. Maybe if there no .../lib64/nvim/ exists, fallback to .../lib/nvim/.
Steps To Reproduce
- Get Debian 13 system and neovim (or any system where
nvim lib lives under lib, but lib64 also exists)
require("lazy").setup(...) according to installation guide (no extra plugins/config needed)
- Open any
:help page. (Or any .lua file. Or some other file types may probably fail too)
- Get nasty error and no syntax highlight
Expected Behavior
Real .../lib../nvim/ is reachable from runtime path.
Repro
vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
require("lazy.minit").repro({
spec = {
-- no extra plugins or config needed
},
})
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.10.4, Build type: Release
Operating system/version
Debian 13 (x86_64)
Describe the bug
The
lazy.nvimduring runtime path reset picks nonexistent/usr/lib64/nvim/path. The real nvim lib path on stock debian (and possibly some other systems) is/usr/lib/nvim/though.It leads to nasty error when opening any
.luafile or even any:helppage (probably not limited to these two) and no highlights (all highlights are working with no lazy'ssetup()though). Treesitter couldn't find parsers (which really live under/usr/lib/nvim/parser) due to wrong "lib" path.Error outputs (probably not important)
$ nvim lazy_conf.lua::help nvim:( Seemingly same problem on Ubuntu )
Workaround over issue
The code causing it:
lazy/core/config.lua:301
It puts directory into runtimepath without checking whether it exist.
Probable solution is check whether
.../lib64/nvim/extist before put it into runtimepath. Maybe if there no.../lib64/nvim/exists, fallback to.../lib/nvim/.Steps To Reproduce
nvimlib lives underlib, butlib64also exists)require("lazy").setup(...)according to installation guide (no extra plugins/config needed):helppage. (Or any.luafile. Or some other file types may probably fail too)Expected Behavior
Real
.../lib../nvim/is reachable from runtime path.Repro