-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parser dependencies don't start automatically #561
Comments
hey 👋 thanks for reporting. Are you using scm parsers or 0.0.x versioned parsers? If the latter, which versions? This is a known issue with scm parsers that depend on other parsers or queries, as you cannot ensure compatibility. |
@mrcjkb I'm using versioned parsers, the php parser version is A thing I'm also experiencing sometimes (but not the other times?..) is that I need to wait a while after opening the file, and only restart treesitter after that. So if I open the file and immediately restart it, nothing happens, but if I wait 20 seconds and restart it, the highlighting gets fixed. |
@mrcjkb seems like this is caused by nvim-neorocks/rocks-treesitter.nvim#39, because manually installing the It seems like parsers which are installed implicitly as dependencies just don't get started automatically sometimes. |
I'll close that issue and copy it here:
|
Ah, I see where the issue is. Those dependencies are for queries, not parsers. I'm quite busy right now, but I'll see if I can come up with a fix on Friday. Moving this issue to rocks.nvim. |
Just tried it out. It works fine on my end with Update: The issue is that there's a delay until the package gets added to the runtimepath. |
On some parsers (I currently found
astro
andphp
to be affected) highlighting doesn't work when you open a file. It sometimes starts working after restarting treesitter or switching a file, but sometimes doesn't.Easiest way to reproduce:
When you open this file with treesitter highlighting enabled, it looks like this:
However, after running
:lua vim.treesitter.stop(); vim.treesitter.start()
:The text was updated successfully, but these errors were encountered: