Repository navigation
fix(ruby): adjust operator highlights - #338
Merged
vitallium merged 9 commits intoSep 23, 2026
Merged
Conversation
AlternateRT
force-pushed
the
adjust-operator-highlights
branch
from
September 19, 2026 16:26
de01586 to
6f1a85a
Compare
Stop capturing most of these from just the bare token and instead capture them when defined in the `operator:` field The previous way erroneously highlighted some of them as operator when used elsewhere - e.g. `/` and `|` are also used as delimiters for the regex literal and block parameters respectively Also adds some missing highlights for the `not`, `?`, and `:` operators
AlternateRT
force-pushed
the
adjust-operator-highlights
branch
from
September 19, 2026 16:28
6f1a85a to
af609ad
Compare
vitallium
requested changes
Sep 20, 2026
vitallium
left a comment
Collaborator
There was a problem hiding this comment.
Looks good! I left some questions and suggestions. Additionally, it would be nice to add some regression tests to ensure that the changes introduced in this MR aren't broken by future changes.
Thanks!
And remove bare captures for `>>` and `>` that are already covered by the `(_ operator: _ @operator)` capture
Also ensure that the highlights for `keyword_parameter` are applied when the node appears inside a `lambda_parameters` or `block_parameters` node, and adjust the highlight of delimited hash key symbols, which is a `string` node whose parent is either `pair` or `keyword_pattern`
AlternateRT
force-pushed
the
adjust-operator-highlights
branch
4 times, most recently
from
September 22, 2026 15:49
ac32ef9 to
688afe1
Compare
AlternateRT
force-pushed
the
adjust-operator-highlights
branch
from
September 22, 2026 16:00
688afe1 to
09e3124
Compare
vitallium
approved these changes
Sep 23, 2026
Collaborator
|
@AlternateRT thanks again for your hard work here! Happy to merge this PR! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stop capturing most of these from just the bare token and instead capture them when defined in the
operator:fieldThe previous way erroneously highlighted some of them as operator when used elsewhere - e.g.
/and|are also used as delimiters for the regex literal and block parameters respectivelyAlso adds some missing highlights for the
not,?, and:operators