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

Multiple arguments with comments #375

Open
jtojnar opened this issue Feb 17, 2023 · 2 comments
Open

Multiple arguments with comments #375

jtojnar opened this issue Feb 17, 2023 · 2 comments
Labels
component | style Modifications to the formatting rules roadmap | style config status | it is a good thing We agree it is good to implement this type | feature request New feature or request

Comments

@jtojnar
Copy link

jtojnar commented Feb 17, 2023

When there are multiple nested anonymous functions, some of which have comment before argument, the arguments without a comment are collapsed, which looks weird:

https://kamadorueda.com/alejandra/?before=pkgs%3A%0A%0A%23+Overlay+to+be+passed+as+packageOverrides+to+Nixpkgs%E2%80%99s+generic+PHP+builder%3A%0A%0Afinal%3A%0Aprev%3A%0A%0Alet%0A++foo+%3D+5%3B%0Ain%0Afoo

Noticed in fossar/nix-phps#190 (comment)

@piegamesde
Copy link
Contributor

For future reference once this is fixed, the playground input is

pkgs:

# Overlay to be passed as packageOverrides to Nixpkgs’s generic PHP builder:

final:
prev:

let
  foo = 5;
in
foo

with output

pkgs:
# Overlay to be passed as packageOverrides to Nixpkgs’s generic PHP builder:
final: prev: let
  foo = 5;
in
  foo

@jtojnar
Copy link
Author

jtojnar commented Mar 24, 2023

Ugh, I added it into the “Reference in new issue” form, not sure why it discarded it. Never mind, this is a different issue.

@kamadorueda kamadorueda added type | feature request New feature or request component | style Modifications to the formatting rules status | it is a good thing We agree it is good to implement this roadmap | style config labels Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component | style Modifications to the formatting rules roadmap | style config status | it is a good thing We agree it is good to implement this type | feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants