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

Misaligned lists of attribute sets #282

Open
tazjin opened this issue Jan 31, 2022 · 1 comment
Open

Misaligned lists of attribute sets #282

tazjin opened this issue Jan 31, 2022 · 1 comment
Labels
bug Something isn't working formatting Issue with the output format

Comments

@tazjin
Copy link

tazjin commented Jan 31, 2022

Input

let it = [{
  k = "1";
} {
  k = "2";
} {
  k = "3";
}]

Output

let it = [{
  k = "1";
}
  {
    k = "2";
  }
  {
    k = "3";
  }]

Desired output

let it = [
  {
    k = "1";
  }
  {
    k = "2";
  }
  {
    k = "3";
  }
]

The correct output will be produced if a \n is inserted between [{.

@tazjin tazjin added formatting Issue with the output format needs triage labels Jan 31, 2022
@zimbatm zimbatm added bug Something isn't working and removed needs triage labels Feb 1, 2022
@meain
Copy link

meain commented Dec 5, 2023

Possibly related: If I try to format the following code which is a function returning a list, the formatting is a bit off.

Expected:

{ utils, ... }:
utils.create_list {
  key = "mango";
} ++ utils.create_list {
  key = "banana";
} ++ utils.create_list {
  key = "apple";
}

Formatted:

{ utils, ... }:
utils.create_list
  {
    key = "mango";
  } ++ utils.create_list {
  key = "banana";
} ++ utils.create_list {
  key = "apple";
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working formatting Issue with the output format
Projects
None yet
Development

No branches or pull requests

3 participants