I have a similar problem. It seems the treesitter provider takes the highlights from syntax or something. I have a custom colorscheme and it displays the 'normal' highlights like String correctly, however things like TSVariable are white as soon as I close the fold. I tried to look into things yesterday, but I'm also not familiar with Treesitter to much, so I couldn't figure out, where to look for the highlight groups your plugin returns.
I was deleting plugins to try and find what might be causing the issue and I'm not seeing the behavior anymore after re-enabling everything. I'm wondering if there were some old treesitter queries laying around causing issues. I'll report back if I figure out what was causing the issue but seems ok for me now.
I have a similar problem. It seems the treesitter provider takes the highlights from syntax or something. I have a custom colorscheme and it displays the 'normal' highlights like String correctly, however things like TSVariable are white as soon as I close the fold. I tried to look into things yesterday, but I'm also not familiar with Treesitter to much, so I couldn't figure out, where to look for the highlight groups your plugin returns.
Neovim version (nvim -v | head -n1)
v0.8.0-dev+513-g01fc5097d
Operating system/version
macOS 12.4
How to reproduce the issue
:TSBufDisable highlight
Expected behavior
Syntax highlighting on folds while using treesitter highlighting.
Actual behavior
Highlighting only shows up after disabling treesitter highlighting and using regex i.e.
:TSBufDisable highlight