nvim-neorocks / rocks.nvim

Neovim plugin management inspired by Cargo, powered by luarocks
GNU General Public License v3.0
546 stars 7 forks source link

Get an error message for "tree-sitter" at the "INSTALLATION COMPLETE" step #402

Open mimikun opened 1 week ago

mimikun commented 1 week ago

Install prompt:

Rocks installation path: /path/to/.local/share/nvim-rocks/rocks
Set up luarocks (recommended) ? :false

Get an error message for "tree-sitter" at the "INSTALLATION COMPLETE" step:

Error in decoration provider treesitter/highlighter.win:
Error executing lua: ...-linux64/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 2:4. Invalid node t
ype "delimiter":
  (delimiter) @markup.heading.1
   ^

stack traceback:
        [C]: in function '_ts_parse_query'
        ...-linux64/share/nvim/runtime/lua/vim/treesitter/query.lua:252: in function 'fn'
        ...vim-linux64/share/nvim/runtime/lua/vim/func/_memoize.lua:58: in function 'fn'
        ...vim-linux64/share/nvim/runtime/lua/vim/func/_memoize.lua:58: in function 'get'
        ...64/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:28: in function 'new'
        ...64/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:240: in function 'get_query'
        ...64/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:188: in function 'fn'
        ...4/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:473: in function 'for_each_tree'
        ...64/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:175: in function 'prepare_highlight_states'
        ...64/share/nvim/runtime/lua/vim/tr

env

other

I'm using lua installed by mise and installing luarocks locally. Strangely enough, I can't reproduce this in another environment(Windows 11 Pro, Ubuntu 22.04(WSL) ).

mrcjkb commented 1 week ago

Hey 👋

Is this reproducible with the latest stable neovim too? It looks like a bundled tree-sitter parser and its queries are out of sync (i.e. perhaps the parser was updated and the queries are out of date).

I'm not sure why it's trying to highlight though. Maybe we can disable tree-sitter highlighting for the installer's buffer.

cc @vhyrro what do you think?

mimikun commented 1 week ago

Thank you for your reply. I will check it when I am in the office on Monday (it's the machine I have at work).