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

improvement(repl): end marker now has the same color as its definition in repl (fix #14535) #14555

Merged
merged 2 commits into from
Mar 14, 2022
Merged

improvement(repl): end marker now has the same color as its definition in repl (fix #14535) #14555

merged 2 commits into from
Mar 14, 2022

Conversation

ireina7
Copy link
Contributor

@ireina7 ireina7 commented Feb 24, 2022

In this PR, we fixed issue #14535 for repl improvement.
Now end markers in definitions of val, def and various kinds of types have the same color as its definition name.

Enum example

Before

image

Now

image

@bishabosha bishabosha self-requested a review February 24, 2022 11:55
@bishabosha bishabosha self-assigned this Feb 24, 2022
@ckipp01
Copy link
Member

ckipp01 commented Mar 9, 2022

Thanks for taking care of this @ireina7!

Gentle ping to get this reviewed since it looks good to me and has been sitting now for a couple weeks.

@@ -107,9 +107,11 @@ object SyntaxHighlighting {
case tree: ValOrDefDef =>
highlightAnnotations(tree)
highlightPosition(tree.nameSpan, ValDefColor)
highlightPosition(tree.endSpan, ValDefColor)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add a test in SyntaxHighlightingTests.scala with a test using an end to test this?

@bishabosha bishabosha requested a review from ckipp01 March 14, 2022 11:25
@bishabosha bishabosha assigned ckipp01 and unassigned bishabosha Mar 14, 2022
@bishabosha
Copy link
Member

I added some tests @ckipp01

Copy link
Member

@ckipp01 ckipp01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, LGTM!

@bishabosha bishabosha merged commit 30ce9a5 into scala:main Mar 14, 2022
@ireina7 ireina7 deleted the marker-color-same-as-def-name branch March 17, 2022 03:02
@Kordyjan Kordyjan added this to the 3.1.3 milestone Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants