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

Rianbow Delimiters and semi-open set notation #64

Closed
jsilve24 opened this issue Sep 3, 2021 · 1 comment
Closed

Rianbow Delimiters and semi-open set notation #64

jsilve24 opened this issue Sep 3, 2021 · 1 comment

Comments

@jsilve24
Copy link

jsilve24 commented Sep 3, 2021

I love this package. However, I just ran into one annoying sticking point and I was looking for ideas.

I have a math equation that has a semi-open set $[0, \infty)$ and now everything below that point in the rest of the document is highlighted with mismatched delimiters...

Is there a way to tell rainbow delimiters to ignore that line? Or as issue #51 just fix it so that the mismatch is recognized to just be there and I don't get highighting in the rest of the document?

I would even be ok with just turning it off in math-environments but I have found it useful there to help me avoid mistakes so I would love to not have to part with it.

Thank you for creating/maintaining such a useful package!

@Fanael
Copy link
Owner

Fanael commented Sep 4, 2021

Is there a way to tell rainbow delimiters to ignore that line? Or as issue #51 just fix it so that the mismatch is recognized to just be there and I don't get highighting in the rest of the document?

Not easily, no, I'm afraid. Rainbow-delimiters is quite intentionally simply following what the Emacs syntax engine tells it — the same syntax engine that's used by {backward,forward}-sexp and show-paren-mode and everything that calls syntax-ppss and so on — both for simplicity reasons and consistency with the rest of the ecosystem. Changing that would require significant effort that's very similar to #1: not impossible, but very difficult to ensure correctness of, because there are approximately seventy five billion edge cases to consider.

However, this particular problem is at least in part caused by AUCTeX itself: I can't reproduce it in other major modes, nor in tex-mode without AUCTeX loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants