HiPhish / rainbow-delimiters.nvim

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

[Bug]: Getting error hovering in Haskell #118

Closed SinTan1729 closed 4 months ago

SinTan1729 commented 4 months ago

Neovim version

v0.10.0

Language affected

Haskell

Query

exp_parens

Strategy

global

Description

The error is happening when I hover over anything. Usually, the brackets are not colored in any Haskell code, but when I hover over anything, I get the following error:

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

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'
        ...y/rainbow-delimiters.nvim/lua/rainbow-delimiters/lib.lua:78: 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_callback'

A minimal code example where it's happening:

hello = "Hello world"
HiPhish commented 4 months ago

It looks like the Haskell parser has renamed all of the nodes. It should be fixed, please try again now. I don't know Haskell myself, so there might be some patterns missing. Please open either a PR or an issue of there are any missing patterns.

SinTan1729 commented 4 months ago

Thank you. The issue seems to be fixed.