-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat: highlighting of return values while the cursor is on match
/ if
/ =>
#19546
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
Merged
+824
−10
Conversation
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
Here's a demo. 2025-04-09.10.32.29.mov |
8fb7504
to
6d3a9e1
Compare
Veykril
reviewed
Apr 14, 2025
335d67b
to
e23e442
Compare
Veykril
approved these changes
May 5, 2025
e23e442
to
6f81f9f
Compare
…y `match`, `if`, or match arm arrow (`=>`)
6f81f9f
to
15e70c2
Compare
I've been busy with work lately... Apologize for the delayed response. |
Veykril
approved these changes
Jun 26, 2025
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.
Thanks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
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.
Inspired by #18924, a follow-up to #17542.
This PR adds a new feature that highlights the related return values when the cursor is on
match
,if
, or a match arm arrow (=>
). This helps users quickly identify the different possible outcomes of control flow expressions.For
match
keyword:match
keyword itselfFor
=>
(match arm arrow):For
if
keyword:if
keywords in theif-else
chainThis feature works with nested expressions and macros.