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
Add bracket highlighter #356
Conversation
Hey there! This looks pretty cool! I don't see an option in the settings to enable/disable this feature though. Would it be possible to include that? I think some users may want to turn this off and I think we want to allow users to do so. Syntax highlighting may provide a good example of how to set up a preference for the query editor! |
I agree about having possibility to disable this from preferences. Sometimes it's needed to work with a huge queries, and syntax highlighting going to be disabled for speed. |
I've added option to "Preferences" which will allow to control enabling/disabling this feature. |
Awesome! Unfortunately, it looks like it's conflicting with the other pref change we just made. Would you be able to resolve? |
dd2661f
to
a881111
Compare
Want to say, I really love this PR. I think this will be a feature that many of us will use and love. |
2445c6d
to
e4afc03
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work, @pmarnik!
I'm not able to reproduce #413 issue. |
@pmarnik Sooo we have an issue here. We were able to get syntaxHighlight performance to really good state, but bracket highlighter is causing a lot of issues. Specifically: Any ideas what to do? We can also simply don't highlight code if the |
Made a hotfix for now: 540b7f6 |
I have some ideas how to improve performance of bracket highlighting. I need to implement cache of comments locations. |
@robinkunde had also a comment that for example Sublime limits num of characters it looks forward (https://forum.sublimetext.com/t/matching-bracket-limit/1852/2) - we could do that too. It doesn't make sense to highlight something that is out of screen, so not looking further than 2000 chars makes sense. What do you think? |
@Kaspik I think that this limit is a good idea. |
Please consider adding this implementation of matching brackets highlighting.