Skip to content
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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

DavisVaughan
Copy link
Member

@DavisVaughan DavisVaughan commented Feb 11, 2025

@DavisVaughan DavisVaughan changed the title First draft of Air release post Air release post Feb 11, 2025
@juliasilge
Copy link
Member

Are we saying too much about what a formatter is? Should it just be a redirect to our website post instead?

I think it's good to include this info here, and not excessive.

@DavisVaughan DavisVaughan marked this pull request as ready for review February 12, 2025 18:58
Copy link
Member

@lionel- lionel- left a 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.

content/blog/air/index.Rmd Show resolved Hide resolved
}
}
```

Copy link
Member

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.

Copy link
Member Author

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?

content/blog/air/index.Rmd Outdated Show resolved Hide resolved

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Member Author

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.

content/blog/air/index.Rmd Outdated Show resolved Hide resolved
Copy link
Member

@hadley hadley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No notes!

@DavisVaughan
Copy link
Member Author

@lorenzwalthert
Copy link
Contributor

lorenzwalthert commented Feb 18, 2025

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 🎉

@DavisVaughan
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants