-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
[Bug]: Invalid highlighting after buffer changes from outside neovim #28
Comments
Yes, that's a known issue. This will most likely take a good while to fix. In the meantime you can |
I don't think the solution should be too complex, here is a dirty way to achieve it:
The idea here is to use |
I like your idea, especially the |
Can you please try the current |
I am on 0.9 and just tried the current |
@HiPhish works for me, thanks! |
Neovim version
0.9.1
Language affected
No response
Query
No response
Strategy
No response
Description
When a file content changes outside of neovim the existing buffer highlights are still the same, meaning that it may highlight characters that were in a position of brackets before the change. In believe this is the same issue as HiPhish/nvim-ts-rainbow2#49 (comment) mrjones2014/nvim-ts-rainbow#9 p00f/nvim-ts-rainbow#112
I have submitted the following fix to one of the rainbow forks mrjones2014/nvim-ts-rainbow#8 I believe it should be a similar fix here.
To easily reproduce create a file called a.py with the following content:
Then with another editor add a line before hello, when switching back to neovim you should see that hello has highlights.
The text was updated successfully, but these errors were encountered: