StyLua
StyLua copied to clipboard
Improve formatting of leading tokens in type union / intersection
#854 will introduce support for leading tokens in unions / interesctions, but we should format them better:
- If single line, remove a leading token
- If multi line, start with a leading token:
type Foo =
| X
| Y
Prettier will probably be a good example for these cases. Interestingly, they only format leading for unions, not intersections: