Closed lzlcs closed 1 year ago
What language? Which strategy?
I apologize for not providing detailed information
Ubuntu 22.04LTS (WSL2)
Language: scheme
Strategy: I have tried both global and local strategies
Plugins Manageer: Lazy
My config:
rainbow = {
enable = true,
-- Which query to use for finding delimiters
query = 'rainbow-parens',
-- Highlight the entire buffer all at once
strategy = require('ts-rainbow').strategy.global,
}
https://github.com/HiPhish/nvim-ts-rainbow2/assets/61308957/9bc2ed4e-1b62-4cd2-841e-4fd23421185d
That is very strange, it works perfectly for me with Scheme. What is your
output of :set filetype?
? Tree-sitter queries also use the file extension
scm
and Neovim might be setting the file type incorrectly. I doubt that's the
problem, but we need to be certain.
Does the highlighting get applied when you execute :edit
on your buffer? What
happens if you add parentheses to an already highlighted section?
:set filetype
Output:
filetype=scheme
https://github.com/HiPhish/nvim-ts-rainbow2/assets/61308957/6b1bce6d-718c-4a1e-b3fe-8c79103959a2
OK, now I'm really out of ideas. Can you please try a minimal setup with only nvim-treesitter and nvim-ts-rainbow2 as the only plugins? See :h $NVIM_APPNAME
for how to set up a configuration under a different name.
I probably won't fix this in this repo. The nvim-treesitter plugin has deprecated the module system, so I am working on a standalone version of this plugin. It's mostly done, but since configuration is different I will make it a new plugin. The code is more or less the same and I have been able to solve some other issues along the way simply by not using the nvim-treesitter module system. I don't know if this issue will also get fixed "for free", but I don't really want to invest more time into a dying plugin.
The transition will be easy, most of the configuration can stay the same. The main difference is where and how it is applied. I will post in this thread once the new plugin is up.
Thank you.
The new rainbow plugin is here: rainbow-delimiters.nvim (GitHub mirror). Please file an issue over there if the problem still persists.
I have to restart nvim so that the paraentheses can be highlighted