Neovim-from-scratch icon indicating copy to clipboard operation
Neovim-from-scratch copied to clipboard

Error while calling lua chunk...

Open kubner opened this issue 2 years ago • 7 comments

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

kubner avatar Apr 30 '22 16:04 kubner

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

jsjoeio avatar Apr 30 '22 18:04 jsjoeio

Let's see if we can figure it out by following the stack trace.

  1. starts here https://github.com/LunarVim/Neovim-from-scratch/blob/master/init.lua#L8
  2. 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.

jsjoeio avatar Apr 30 '22 18:04 jsjoeio

Verified that works 🎉

image

jsjoeio avatar Apr 30 '22 18:04 jsjoeio

@jsjoeio Thanks!

kubner avatar Apr 30 '22 18:04 kubner

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

adrien-barret avatar May 02 '22 02:05 adrien-barret

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,

Crowds21 avatar May 11 '22 13:05 Crowds21

forgot but found a solution which is put "all" and exclude php which is not arm64 atm

adrien-barret avatar May 11 '22 17:05 adrien-barret

should be fixed now

gnmearacaun avatar Jun 30 '23 01:06 gnmearacaun