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

Q: any option to align -> in when? #384

Closed
dxxvi opened this issue Feb 12, 2023 · 3 comments
Closed

Q: any option to align -> in when? #384

dxxvi opened this issue Feb 12, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@dxxvi
Copy link

dxxvi commented Feb 12, 2023

This is a when example:

when (x) {
  "some very long value" -> TODO()
  else -> TODO()
}

I would like to align those 2 -> like in scalafmt

when (x) {
  "some very long value" -> TODO()
  else                   -> TODO()
}

Is it possible?

@hick209 hick209 added the enhancement New feature or request label Sep 18, 2023
@hick209
Copy link
Contributor

hick209 commented Sep 18, 2023

I believe this is something we could achieve. It would have to leave under a option in case we do want to have something like this.

Often though we prefer to just stick to standards since this would make the formatter simpler and easier to maintain.
Meaning this is likely not something we would implement ourselves.

@cgrushko, any inputs here? Would this be a welcomed PR if gated by an option or something like this?

@hick209 hick209 closed this as completed Sep 18, 2023
@hick209 hick209 reopened this Sep 18, 2023
@hick209
Copy link
Contributor

hick209 commented Sep 18, 2023

Closed by accident. Reopening

@hick209
Copy link
Contributor

hick209 commented Jun 5, 2024

I'm closing the issue as this is not something that we intend to work on, but we would welcome a PR so feel free to submit one

@hick209 hick209 closed this as completed Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants