Neovim-from-scratch
Neovim-from-scratch copied to clipboard
Error while calling lua chunk...
I have this error every time I open nvim. It also causes some plugins not to load. Any help will be appreciated.
Error detected while processing /home/user/.config/nvim/init.lua:
E5113: Error while calling lua chunk: ...er/start/nvim-treesitter/lua/nvim-
treesitter/install.lua:373: Parser not available for language maintained
stack traceback:
[C]: in function 'get_parser_install_info'
...er/start/nvim-treesitter/lua/nvim-treesitter/install.lua:373: in
function 'install_lang'
...er/start/nvim-treesitter/lua/nvim-treesitter/install.lua:419: in
function 'ensure_installed'
...er/start/nvim-treesitter/lua/nvim-treesitter/configs.lua:388: in
function 'setup'
/home/user/.config/nvim/lua/user/treesitter.lua:6: in main chunk
[C]: in function 'require'
/home/user/.config/nvim/init.lua:8: in main chunk
I just ran into this as well. I see an upstream issue linked to this: https://github.com/nvim-treesitter/nvim-treesitter/issues/2293#issuecomment-1113959051
Let's see if we can figure it out by following the stack trace.
- starts here https://github.com/LunarVim/Neovim-from-scratch/blob/master/init.lua#L8
- seems to be this line: https://github.com/LunarVim/Neovim-from-scratch/blob/master/lua/user/treesitter.lua#L7
It looks like we need to explicitly give it a list. Here is an example:
ensure_installed = { "c", "lua", "rust" }
Found here: https://github.com/nvim-treesitter/nvim-treesitter#modules
I can open a PR for this.
Verified that works 🎉
@jsjoeio Thanks!
have the same error, waiting for the PR ;)
E5113: Error while calling lua chunk: ...er/start/nvim-treesitter/lua/nvim-treesitter/install.lua:373: Parse
r not available for language maintained
stack traceback:
[C]: in function 'get_parser_install_info'
...er/start/nvim-treesitter/lua/nvim-treesitter/install.lua:373: in function 'install_lang'
...er/start/nvim-treesitter/lua/nvim-treesitter/install.lua:419: in function 'ensure_installed'
...er/start/nvim-treesitter/lua/nvim-treesitter/configs.lua:388: in function 'setup'
/Users/adrien.barret/.config/nvim/lua/user/treesitter.lua:6: in main chunk
[C]: in function 'require'
/Users/adrien.barret/.config/nvim/init.lua:8: in main chunk
Just delete the " "
in the code, and it works.
( I didn't learn Lua before. I'm not sure changing from string to other form won't make any other difference.)
File path: ~/.config/nvim/lua/user/treesitter.lua
ensure_installed = maintained,
forgot but found a solution which is put "all" and exclude php which is not arm64 atm
should be fixed now