Note
air is currently in alpha. Expect breaking changes both in the API and in formatting results.
An R formatter and language server, written in Rust.
Install air using our standalone installers.
On macOS and Linux:
curl -LsSf https://github.com/posit-dev/air/releases/latest/download/air-installer.sh | sh
On Windows:
powershell -c "irm https://github.com/posit-dev/air/releases/latest/download/air-installer.ps1 | iex"
For a specific version:
curl -LsSf https://github.com/posit-dev/air/releases/download/0.1.1/air-installer.sh | sh
powershell -c "irm https://github.com/posit-dev/air/releases/download/0.1.1/air-installer.ps1 | iex"
The installer scripts will automatically add air to your PATH
. The very first time you install air, for the PATH
modifications to be applied:
- On macOS and Linux, you'll need to restart your shell.
- On Windows, you'll need to restart your computer.
air draws inspiration from many sources including roslyn, swift, rust-analyzer, prettier, biome, and ruff. These are all excellent tools that provide either formatters, language servers, or both, all of which have influenced design decisions in air.
We are particularly thankful to biome, as air is built on top of their language agnostic tooling for both building a rowan syntax tree and implementing a formatter. Biome is an open source project maintained by community members, please consider sponsoring them.
Install the dev version of the air cli with:
cargo install --path crates/air --debug
This installs it to ~/.cargo/bin
(which must be on your PATH
), and can be removed with cargo uninstall air
.
Install the dev version of the VS Code extension:
# The first time
npm install --global vsce
# Install for Positron
cd editors/code && rm -rf *.vsix && vsce package && positron --install-extension *.vsix
# Install for VS Code
cd editors/code && rm -rf *.vsix && vsce package && code --install-extension *.vsix
The CLI tools for Positron or VS Code need to be installed on your path using the command palette command Shell Command: Install 'code'/'positron' command in PATH
.