Skip to content
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

fix(nvim-ts-rainbow2): remove hack #162

Merged
merged 1 commit into from
Apr 26, 2023
Merged

Conversation

utkarshgupta137
Copy link
Contributor

Recently, I've noticed that my editor slows down over time. Turns out that this hack is causing the problem. Without it, there is no more slowdown.

@A-Lamia
Copy link
Contributor

A-Lamia commented Apr 25, 2023

aaaah, so this is what causes the slow down i thought i was going insane.

So then is there still an issue with ranbow-ts that needs the hack ?

if there isn't a fix i might just disabled it.

@mehalter
Copy link
Member

Yeah the unfortunate thing is without this autocmd, the coloring just gets messed up over time 😂 it seems that rainbow parentheses are just never going to be stable in Neovim 🤔

@A-Lamia
Copy link
Contributor

A-Lamia commented Apr 25, 2023

not sure if it's a good idea letting people use this, maybe put a warning on the read me to let people know ?

@utkarshgupta137
Copy link
Contributor Author

aaaah, so this is what causes the slow down i thought i was going insane.

Me too brother, me too. You've no idea how much time I spent debugging this 😭.

So then is there still an issue with ranbow-ts that needs the hack ?

Yes.

if there isn't a fix i might just disabled it.

AFAIK, nvim-rainbow-ts doesn't have an issue with this hack. It seems like this fork changed something recently which made this hack slow down the editor.
A better fix is to do it manually once in a while. I've created a custom command & a mapping & I run it every few minutes. Doing it manually seems to have better results too, since there is a delay between disable & enable.

@utkarshgupta137
Copy link
Contributor Author

not sure if it's a good idea letting people use this, maybe put a warning on the read me to let people know ?

Not sure if we should be commenting on the state of the plugins. I think people can try it & find out about it themselves. Maybe the support is better for some languages. We could however add a note & link saying that toggling it seems to fix the issue.

@A-Lamia
Copy link
Contributor

A-Lamia commented Apr 25, 2023

maybe we should do it on save ?

EDIT: I'm dumb, was already on save.

EDIT2: Why would it work manually though there isn't a difference in what is logically happening.

@utkarshgupta137
Copy link
Contributor Author

maybe we should do it on save ?

EDIT: I'm dumb, was already on save.

EDIT2: Why would it work manually though there isn't a difference in what is logically happening.

Maybe it has time to properly remove all the highlights? Not sure

@utkarshgupta137
Copy link
Contributor Author

@mehalter This issue might be plaguing unsuspecting users, can we release this on priority?

Copy link
Member

@mehalter mehalter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mehalter mehalter merged commit 9fda1ed into AstroNvim:main Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants