-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Bracket highlighter overrides the main highlighter's substitution delimiter #889
Comments
So, sort ZSH_HIGHLIGHT_HIGHLIGHTERS the way around ( |
While that solves the mentioned issue, doing that is equivalent to turning
|
Sorry about that. Two other ideas:
|
This one feels kind of like a hack, so I would avoid it.
This one seems like a proper way to go about it. |
While that solves the mentioned issue, doing that is equivalent to
turning `brackets` off 😄
Now you're just moving the goalposts! :)
* No warning for unbalanced parentheses
* No highlight for matching parenthesis when cursor is positioned on
the parenthesis
* No colors for nested parentheses, even when they have no dollar signs
in front of them
Sorry about that.
Two other ideas:
- Skip adding highlighting for a pair of brackets if either of them is already covered by a $region_highlight element for which $((end - start >= 2)) — i.e., an element that covers multiple characters.
- Have highlighters some information in the $region_highlight memo= field about the thing highlighted by that $region_highlight element: e.g., memo=zsh-syntax-highlighting:0.8:main:command-substitution. The brackets highlighter could use that information to selectively disable itself. Requires zsh ≥5.9.
|
Steps to reproduce:
termite -e 'zsh -dfi'
main
highlighter with defined substitution style$(
and)
is done withmagenta
color, as specifiedbrackets
highlighter to the mixCan this be changed so that
main
highlighter has priority when parenthesis is part of the delimiter syntax?I don't think hacking
brackets
highlighter's levels of nesting would solve this in the general case because some delimiters use only one pair of parentheses ($()
), while arithmetic evaluation for example uses 2 pairs of parentheses ($(())
).Versions:
The text was updated successfully, but these errors were encountered: