typstfmt
typstfmt copied to clipboard
[suggestion] Formatting `align` with 1 argument
I would prefer if typstfmt
wouldn't format at least this simple code:
#align(center)[
something
]
to this:
#align(
center,
)[
something
]
It's just not efficient (and pretty ugly).
But with long variables (instead of values) with which the line exceeds max_line_length
, the current formatting is necessary:
#let asdkfhjaskfdahskfdahsfjhaskjasdhfihweuioiuvnueiniuqiybiuwybfwiefwieuyfdfhasjfhd = center
#align(asdkfhjaskfdahskfdahsfjhaskjasdhfihweuioiuvnueiniuqiybiuwybfwiefwieuyfdfhasjfhd)[
something
]
#let asdkfhjaskfdahskfdahsfjhaskjasdhfihweuioiuvnueiniuqiybiuwybfwiefwieuyfdfhasjfhd = center
#align(
asdkfhjaskfdahskfdahsfjhaskjasdhfihweuioiuvnueiniuqiybiuwybfwiefwieuyfdfhasjfhd,
)[
something
]
P.S. Since align
mostly used with 1 short argument/value, it's only logical to optimize formatting for it. If there are similar cases with other functions, then some general rule can be applied.