You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, thank you for this tool! After using Ruff and rustfmt, I'm very happy to see fast formatting coming to R.
I was testing air on some packages and noticed that tibble::tribble() are reformatted with one element per line, which makes it harder to read:
Before:
tribble(
~colA, ~colB,
"a", 1,
"b", 2,
"c", 3
)
After:
tribble(
~colA,
~colB,
"a",
1,
"b",
2,
"c",
3
)
I saw this was mentioned in #26 but the issue is now closed and I didn't find any mention of this in docs/formatter.md, so I'm just opening this so that it is tracked somewhere. I hope it's not a duplicate.
Yes, right now there is no way to avoid the mess that you see here with tribble() calls.
We really want to avoid hardcoding any specific function names into the formatter. One idea is to turn off formatting altogether. You can't do this yet but it would look something like
# air format: ignore
tribble(
~x, ~y1, 2
)
We are also considering more powerful comments that would actually help you enforce a particular format, like
# air format: layout-tabular
tribble(
~x, ~y1, 2
)
This would snap you into a rectangular layout as you type to help you out (probably falling back to a "verbatim" what-you-see-is-what-you-get layout if the number of arguments doesn't divide evenly into a rectangle)
Hello, thank you for this tool! After using Ruff and rustfmt, I'm very happy to see fast formatting coming to R.
I was testing
air
on some packages and noticed thattibble::tribble()
are reformatted with one element per line, which makes it harder to read:Before:
After:
I saw this was mentioned in #26 but the issue is now closed and I didn't find any mention of this in
docs/formatter.md
, so I'm just opening this so that it is tracked somewhere. I hope it's not a duplicate.Thanks again
Tested on
main
with 093bb96The text was updated successfully, but these errors were encountered: