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: New inlay hints options #6236

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

jkciesluk
Copy link
Member

Adds new user configuration for inlay hints, with a fallback to old settings.

Also adds separate option for inlay hints inside pattern match.

@@ -231,7 +225,7 @@ object UserConfiguration {
|""".stripMargin,
),
UserConfigurationOption(
"show-inferred-type",
"inferred-types",
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be inlay-hints.inferred-types?

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, I've missed that. Even inlay-hints.inferred-types.enable

val qualStart = sel.qualifier.pos.start
val nameStart = sel.namePosition.start
qualStart != nameStart && nameStart < text.length() &&
!text.slice(qualEnd, nameStart).contains(".")
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you explain what are you fixing here?

Copy link
Member Author

Choose a reason for hiding this comment

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

The were some false positives, but I don't remember where exactly

Adds new user configuration for inlay hints, with a fallback to old settings.
Also adds separate option for inlay hints inside pattern match.
Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

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

LGTM!

@jkciesluk jkciesluk merged commit 05331d1 into scalameta:main Apr 4, 2024
26 checks passed
@jkciesluk jkciesluk deleted the inlay-hint-options branch April 4, 2024 14:46
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.

3 participants