HiPhish / rainbow-delimiters.nvim

Rainbow delimiters for Neovim with Tree-sitter
https://gitlab.com/HiPhish/rainbow-delimiters.nvim
Apache License 2.0
520 stars 38 forks source link

[Bug]: golang "var_spec_list" #135

Closed soisyourface closed 1 week ago

soisyourface commented 1 week ago

Neovim version

v0.10.1

Language affected

Go

Query

(var_spec_list "(" @delimiter ")" @delimiter @sentinel) @container

Strategy

No response

Description

This is documented in the changelog in an Unreleased fix as switching from var_declaration to var_spec_list.

I'm assuming that I have an old/incompatible version of treesitter/nvim-treesitter or treesitter-go or something, but i think they are all up to date.

Full stacktrace:

Error in decoration provider treesitter/highlighter.win:
Error executing lua: /usr/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 9:2. Invalid node type "var_spec_list":
(var_spec_list
 ^

stack traceback:
        [C]: in function '_ts_parse_query'
        /usr/share/nvim/runtime/lua/vim/treesitter/query.lua:252: in function 'fn'
        /usr/share/nvim/runtime/lua/vim/func/_memoize.lua:58: in function 'fn'
        /usr/share/nvim/runtime/lua/vim/func/_memoize.lua:58: in function 'get_query'
        ...t/rainbow-delimiters.nvim/lua/rainbow-delimiters/lib.lua:77: in function 'get_query'
        ...limiters.nvim/lua/rainbow-delimiters/strategy/global.lua:191: in function 'thunk'
        .../rainbow-delimiters.nvim/lua/rainbow-delimiters/util.lua:33: in function 'for_each_child'
        ...limiters.nvim/lua/rainbow-delimiters/strategy/global.lua:187: in function 'setup_parser'
        ...limiters.nvim/lua/rainbow-delimiters/strategy/global.lua:266: in function 'cb'
        /usr/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:899: in function '_do_callba
HiPhish commented 1 week ago

What commit is your nvim-treesitter on? The one used for testing is on 5b8b126de02ebfd92e46ed5986b3e58e870b85de and all highlight tests are passing. Have you tried executing TSUpdate?

soisyourface commented 1 week ago

ah, my output said master for nvim-treesitter but it's pinned to an older version. likely because of some of my other plugins. sorry for the false alarm. i should have looked closer at the version.

i'll just pin my rainbow-delimiters version for now while i get the other plugins all updated.

for anyone else that might find this, i'm using lunarvim to handle most plugins and the current master of lunarvim has the changes needed. will just wait for that to land.