Skip to content

Conversation

tgodzik
Copy link

@tgodzik tgodzik commented Apr 27, 2025

Backports scala#22819 to the 3.3.7.

PR submitted by the release tooling.
[skip ci]

…#22819)

Partial Fix for scalameta/metals#7274

We have in our completion provider an option to automatically fill a
case class constructor with named parameters:

```scala
case class A(x: Int, y: Int)

val a = A(@@)
          ^^ // would fill in here
val a = A(x = ???, y = ???)
          //  ^^^      ^^^  cursor marks added, so tabs can be used to move between the fields
```

However previously it was labeled `Autofill with default values`, which
would never pass editors' filters based on the
current state of input (most likely the name of a field).
The only way to find this option was to type something matching the
`Autofill with default values` label, which explains the
`auto` in the above issue.

We now provide the actual provided fields as the label, so the above
would show `x = ???, y = ???` instead, which is both
more intuitive for the user, and more friendly to editors.
[Cherry-picked 744ba92]
Base automatically changed from backport-lts-3.3-22759 to lts-3.3 April 27, 2025 18:57
@tgodzik
Copy link
Author

tgodzik commented Apr 27, 2025

No regressions detected in the community build up to backport-lts-3.3-22905.

Reference

@tgodzik tgodzik merged commit 70fc1d3 into lts-3.3 Apr 27, 2025
22 checks passed
@tgodzik tgodzik deleted the backport-lts-3.3-22819 branch April 27, 2025 18:57
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.

2 participants