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

Cleanup + missing rust query + wgsl support #120

Closed Danielkonge closed 1 month ago

Danielkonge commented 1 month ago

Neovim has updated some type signatures, so I updated them too here.

Also regtype = 'c' causes errors for me, so I changed it to regtype = 'v', which seems to be what we want -- see: https://neovim.io/doc/user/builtin.html#getregtype() . I am not sure when this was changed in Neovim recently, or if this code has always been wrong? (Wrong in the sense that it maybe should have been 'v' technically, although it definitely did accept 'c' previously.)

(Note: I haven't yet tested this in older versions of Neovim)

Finally I added a missing rust query and wgsl support in separate commits.

catdadcode commented 1 month ago

I sure hope this gets merged soon. Have had to disable the plugin completely until then.

Until then I've just gone and dropped in your fork and branch into my config so I can have my glorious colored brackets back immediately :)

https://github.com/catdadcode/.dotfiles/commit/c47ff5bdc51c57ec5b9fe74edacf20279c558315

HiPhish commented 1 month ago

@Danielkonge Can you please rebase onto the current master? There have been a couple of changes, including changing the c to v. That part confuses me though. According to the documentation the acceptable values are the same as in setreg(), which has both c and v as synonyms.

Danielkonge commented 1 month ago

I rebased onto the current master now.

Also, if

According to the documentation the acceptable values are the same as in setreg(), which has both c and v as synonyms.

is true, then we should maybe report this as an issue upstream.

HiPhish commented 1 month ago

Merged, thank you very much.

is true, then we should maybe report this as an issue upstream.

It's a change in master over at Neovim from a few days ago. They changed the opts argument of vim.highlight.range() to where the regtype string conforms to getregtype() instead of setreg(). I did not test with the nightly builds, so this went past me.