Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Arity
Arity is a language server, formatter, and linter for the R programming language, built on a lossless, incremental parser. It provides a fast, deterministic development experience that integrates with popular code editors and IDEs.
- Formatter: deterministic, rule-based formatting based on the tidyverse
style guide, with idempotent output and support for roxygen and
DESCRIPTION(.dcf) files. - Linter: project-aware linting, with correctness, readability, and performance rules, many with safe autofixes.
- Language server: formatting, diagnostics with quick fixes, hover, completion, signature help, go-to-definition and references, rename, document and workspace symbols, semantic tokens, folding, and call hierarchy.
Installation
Arity is available from several sources:
- crates.io:
cargo install arity - Homebrew:
brew install jolars/tap/arity - npm:
npm install -g arity-cli(bundles a prebuilt binary) - PyPI:
uv tool install arity/pipx install arity - Aqua:
aqua install jolars/arity - Prebuilt binaries: from the releases page
- VS Code/Open VSX: the Arity extension (also works in Positron)
- Arch Linux:
pacman -S arity-bin(orarity) (from the AUR:arity-bin,arity) - NixOS: the
aritypackage is available in nixpkgs
Install Script
The installer scripts pick the right release artifact for your platform and install to a user-local directory by default. They download the matching Arity CLI release asset and verify its checksum. If you prefer, download and inspect the script before running it.
For macOS and Linux:
|
For Windows PowerShell:
powershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://arity.cc/install.ps1 | iex"
Set ARITY_INSTALL_DIR to change the destination, ARITY_TAG to pin a version,
ARITY_LIBC (gnu or musl) to override the detected libc on Linux, and
ARITY_VERIFY_CHECKSUM=false to skip checksum verification.
Usage
# Format in place
# Verify formatting without writing
# Lint a project directory
# Fix lint findings in place
arity lint reads from stdin when given - (or when piped with no paths), and
exits non-zero when it reports any findings.
Configuration
Configure Arity with arity.toml, which is discovered by walking up from each
file's directory to the repository root. Run arity init to scaffold a
commented starter file. See the configuration
reference for every key.
Editor Integration
arity lsp starts a stdio-based language server offering formatting,
diagnostics with quick fixes, hover, completion, signature help,
go-to-definition and references, rename, document and workspace symbols,
semantic tokens, folding, and call hierarchy.
The Arity extension for VS Code/Open VSX (and Positron) bundles the binary and starts the server automatically. For Neovim, Helix, and other editors, see the editor setup guide.
Pre-Commit Hook
arity-pre-commit provides pre-commit hooks for linting and formatting. It installs a prebuilt binary wheel from PyPI, so no Rust toolchain or R installation is required:
repos:
- repo: https://github.com/jolars/arity-pre-commit
# arity version
rev: v0.18.0
hooks:
# Lint .R files
- id: arity-lint
# Format the same files in place
- id: arity-format
GitHub Actions
arity-action installs Arity and runs format and lint checks in CI:
jobs:
arity:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: jolars/arity-action@v1
Crates
The parsing and formatting engines are published as standalone crates for use in
other tools: arity-parser (lossless
CST parser, typed AST wrappers, incremental reparser) and
arity-formatter (the formatter,
with optional serde/schemars support for embedders). Both are versioned
independently of the CLI.
Acknowledgements
The core architecture of Arity is entirely based on rust-analyzer, using salsa for incremental computation and rowan for lossless syntax trees. Arity also owes a great debt to air, on which it is heavily inspired and from which it has borrowed tests, rules, and formatting style. It is also inspired by jarl and has borrowed rules from it as well as some of its architecture.
Documentation
Full documentation lives at arity.cc: