nushell / tree-sitter-nu

A tree-sitter grammar for nu-lang, the language of nushell
MIT License
122 stars 27 forks source link

Error with nvim-treesitter version #138

Closed jceb closed 2 weeks ago

jceb commented 2 weeks ago

Since this week, I'm having trouble getting tree-sitter-nu to work. I'm using this neovim version with the current tree-sitter-nu 7e0f16f608a9e804fae61430ade734f9f849fb80 git tag and nvim-treesitter's latest version.

:version
NVIM v0.10.2
Build type: Release
LuaJIT 2.1.1713773202

Installation of the parser works fine, a plain :TSInstall nu works without issues. However, when I open a nushell file, I'm getting endless traces like the following:

Error in decoration provider treesitter/highlighter.win:
Error executing lua: ...d-0.10.2/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 1:2. Invalid node type "string":
(string) @string
 ^

stack traceback:
        [C]: in function '_ts_parse_query'
        ...d-0.10.2/share/nvim/runtime/lua/vim/treesitter/query.lua:252: in function 'fn'
        ...pped-0.10.2/share/nvim/runtime/lua/vim/func/_memoize.lua:58: in function 'fn'
        ...pped-0.10.2/share/nvim/runtime/lua/vim/func/_memoize.lua:58: in function 'get'
        ....2/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:28: in function 'new'
        ....2/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:243: in function 'get_query'
        ....2/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:191: in function 'fn'
        ...2/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:491: in function 'for_each_tree'
        ....2/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:178: in function 'prepare_highlight_states'
        ....2/share/nvim/runtime/lua/vim/treesitter/highlighter

Any hints on how to debug and solve the issue are highly appreciated.

blindFS commented 2 weeks ago

Do you use other plugins such as LhKipp/nvim-nu?, I think its highlight.scm file is out of date.

jceb commented 2 weeks ago

Thanks mate, you made my day! I just disabled nvim-nu and it's working fine again!