-
Notifications
You must be signed in to change notification settings - Fork 113
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
Air release post #725
base: main
Are you sure you want to change the base?
Air release post #725
Conversation
I think it's good to include this info here, and not excessive. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels like we're missing a conclusion? How about:
By contributing this formatter to the R community, our objective is threefold:
-
Vastly ìmprove your enjoyment of writing well-laid-out R code by removing the chore of editing whitespace.
-
Reduce friction in collaborative projects by establishing a consistent style once and for all.
-
Improve the overall readability of R code for the community.
We hope that Air will prove to be a valuable companion in your daily workflow.
} | ||
} | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this enables the gesture only for R files. If you'd like to enable it for any language, hoist the editor.formatOnSave
line at top-level. We generally don't recommend to do that however and instead enable it on a case by case basis as we've shown here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's a little too much for an intro guide, especially since it is something we don't recommend?
|
||
Air is written in Rust using the formatting infrastructure provided by [Biome](https://github.com/biomejs/biome)[^2]. | ||
This is also the same infrastructure that [Ruff](https://github.com/astral-sh/ruff), the fast Python formatter, originally forked from. | ||
Both of those projects are admired for their performance, and Air is no exception. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both of those projects are admired for their performance, and Air is no exception. | |
Both of those projects are admired for their performance, and Air is no exception thanks to the high quality of the Biome formatting infrastructure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm that feels a little repetitive since we open the paragraph with the fact that we use biome
Air is written in Rust using the formatting infrastructure provided by Biome. This is also the same infrastructure that Ruff, the fast Python formatter, originally forked from. Both of those projects are admired for their performance, and Air is no exception.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No notes!
Hi @DavisVaughan, cool post. Maybe I am late to the party, but I just read through it and I wonder if it made sense in the comparison to also look at features in a more broad sense and integrations with other tools (and if you plan to build some of the ones {styler} has too?). This could just be a sentence. For example, {styler} can also format qmd / rmd / rnw docs and is integrated with a hand-full of other tools mentioned in thid-party integrations vignette. I guess depending on how someone uses {styler}, these would be relevant in a migration (e.g. if qmd is not supported yet, that would be relevant for some users). I assume air can already do qmd for example or plans to do that in the future? As I told you in our call, I am happy to help with the pre-commit integration if you want. Shouldn't be hard. In any case, happy release 🎉 |
We don't have all the tools set up yet but we do mention a few workflows for using Air here https://deploy-preview-725--tidyverse-org.netlify.app/blog/2025/02/air/#how-can-i-use-air For qmd, in VS Code (and Positron, but there is a bug there right now) the Quarto extension itself is responsible for powering formatting R chunks. It ends up handing off the R chunk to Air to format, and this mostly just works automatically without Quarto having to know anything about Air. We note how to turn that on here but I didn't want to mention it in the blog post yet because it doesn't work in Positron yet https://posit-dev.github.io/air/editor-vscode.html#quarto. For qmd in RStudio and at the command line, we aren't sure what the plan is yet. It would make sense for Air to be able to natively format qmds and rmds, but a quarto parser isn't exposed by quarto itself to make this easy on us. |
https://deploy-preview-725--tidyverse-org.netlify.app/