You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Wolfram Mathematica code, special symbols (such as the Greek letters) are encoded as \[kappa]. The rainbow-delimiters package correctly identifies the ending ] as a closing bracket; however, as the first one is 'escaped' it fails to match the open bracket. This causes rainbow-delimiters to highlight nearly all unbalanced brace/brackets.
Short of disabling rainbow-delimiters entirely, is it possible to get rainbow-delimiters to ignore the matching brackets in this case? For example, get it to ignore any \[...] pattern?
The text was updated successfully, but these errors were encountered:
is it possible to get rainbow-delimiters to ignore the matching brackets in this case? For example, get it to ignore any \[...] pattern?
Yes. It requires, however, one of the following:
Cooperation from the major mode, in the form of making it so the closing bracket is not seen by parse-partial-sexp as one, for example, by using syntax-table text properties. This is the best way, and will make all other code relying on parse-partial-sexp and similar functions just work.
A workaround that sets the relevant text properties while not being a part of the major mode, but behaves more or less the same as if it were. Should be easy to write, but don't expect it to be merged into rainbow-delimiters: I realized long ago that adding hacks that work around major mode issues is a fool's errand. There's just too many ways a major mode can be subtly broken.
In Wolfram Mathematica code, special symbols (such as the Greek letters) are encoded as
\[kappa]
. The rainbow-delimiters package correctly identifies the ending]
as a closing bracket; however, as the first one is 'escaped' it fails to match the open bracket. This causes rainbow-delimiters to highlight nearly all unbalanced brace/brackets.Short of disabling rainbow-delimiters entirely, is it possible to get rainbow-delimiters to ignore the matching brackets in this case? For example, get it to ignore any
\[...]
pattern?The text was updated successfully, but these errors were encountered: