HiPhish / rainbow-delimiters.nvim

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

[Bug]: Error messages keep popup and preventing me to edit file #111

Closed ray-x closed 1 month ago

ray-x commented 1 month ago

Neovim version

NVIM v0.10.0-dev-2698+g00e71d3da

Language affected

Go

Query

No response

Strategy

No response

Description

this happens when I delete multiple matching delimiters while editing a go file. The following messages keep popping up

Error in decoration provider treesitter/highlighter.win:
Error executing lua: Vim:E1174: String required for argument 1                                                                                                                                                                                                  
stack traceback:                                                                                                                                                                                                                                                
        [C]: in function 'charidx'                                                                                                                                                                                                                              
        vim/_editor.lua: in function 'region'                                                                                                                                                                                                                   
        ...vim-macos-arm64/share/nvim/runtime/lua/vim/highlight.lua:78: in function 'range'                                                                                                                                                                     
        ...y/rainbow-delimiters.nvim/lua/rainbow-delimiters/lib.lua:111: in function 'highlight'                                                                                                                                                                
        ...limiters.nvim/lua/rainbow-delimiters/strategy/global.lua:51: in function 'highlight_matches'                                                                                                                                                         
        ...limiters.nvim/lua/rainbow-delimiters/strategy/global.lua:52: in function 'highlight_matches'                                                                                                                                                         
        ...limiters.nvim/lua/rainbow-delimiters/strategy/global.lua:52: in function 'highlight_matches'                                                                                                                                                         
        ...limiters.nvim/lua/rainbow-delimiters/strategy/global.lua:52: in function 'highlight_matches'                                                                                                                                                         
        ...limiters.nvim/lua/rainbow-delimiters/strategy/global.lua:52: in function 'highlight_matches'                                                                                                                                                         
        ...limiters.nvim/lua/rainbow-delimiters/strategy/global.lua:52: in function 'highlight_matches'                                                                                                                                                         
        ...limiters.nvim/lua/rainbow-delimiters/strategy/global.lua:16
Press ENTER or type command to continue          

This prevents me from interacting with vim. Anyway to put the plugin in silent mode?

ray-x commented 1 month ago

Screenshot image

HiPhish commented 1 month ago

Can you please provide a sample Go file and explain how you delete those delimiters? I need to replicate the issue on my end. The error is raised by some function outside my control, so I cannot simply silence it, I need to figure out why the function is getting invalid arguments in the first place and prevent it from getting called.

ray-x commented 1 month ago

Thanks for looking into this. It happened once yesterday. I did not keep the code snippets. But it seems I can not easily reproduce it by just deleting one or two delimiters. I will close the issue until I find an easy way to reproduce the issue.