Skip to content

pc: Implement code action 'convert to named lambda parameters' #22799

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

Conversation

KacperFKorban
Copy link
Member

@KacperFKorban KacperFKorban commented Mar 13, 2025

Associated Metals PR: scalameta/metals#6669

Add a code action that converts a wildcard lambda to a lambda with named parameters. It supports Scala 3 only at the moment.

e.g.
converttonamedlambdaparameters
converttonamedlambdaparameters1

Copy link
Member

@kasiaMarek kasiaMarek 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. It'd be cool to also cover:

x.map(<<f>>)

- correctly check diffs in 'convert to named lambda parameter' code
  action tests
- add a fallback for empty names in type based term name inference
@KacperFKorban KacperFKorban merged commit 43118de into scala:main May 1, 2025
29 checks passed
@KacperFKorban KacperFKorban deleted the convert-to-named-lambda-params branch May 1, 2025 13:43
tgodzik pushed a commit to scala/scala3-lts that referenced this pull request May 5, 2025
…#22799)

Associated Metals PR: scalameta/metals#6669

Add a code action that converts a wildcard lambda to a lambda with named
parameters. It supports Scala 3 only at the moment.

e.g.

![converttonamedlambdaparameters](https://github.com/user-attachments/assets/93561630-b626-4cff-8248-806e4c32744a)

![converttonamedlambdaparameters1](https://github.com/user-attachments/assets/292ad14f-be8b-4535-b4e4-45819f14da9e)
[Cherry-picked 43118de]
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