Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working formatting Issue with the output format
Projects
None yet
Development

No branches or pull requests

3 participants