Skip to main content

A language server, formatter, and linter for R

Project description

Arity

Build and Test Crates.io Open VSX VS Code PyPI version npm version

Arity is a language server, formatter, and linter for the R programming language, built in Rust 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 toward the tidyverse style guide, with idempotent output and roxygen support.
  • Linter: a growing set of 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.

Runs on Linux, macOS, and Windows (x86_64 and arm64).

Installation

Arity is available from several sources:

  • crates.io: cargo install arity
  • npm: npm install -g arity-cli (bundles a prebuilt binary)
  • PyPI: uv tool install arity/pipx install arity
  • Prebuilt binaries: from the releases page
  • VS Code/Open VSX: the Arity extension (also works in Positron)
  • Arch Linux: pacman -S arity-bin (or arity) (from the AUR: arity-bin, arity)

Formatter

To format your code, you can use:

  • arity format [file]
  • arity format --verify [file]
  • arity format --check <path> [<path> ...]

Linter

To lint your code, you can use:

  • arity lint <path> [<path> ...]

arity lint reads from stdin when given no paths, and exits non-zero when it reports any findings.

Configuration

Arity reads an optional arity.toml, 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.13.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

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:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arity-0.14.0.tar.gz (924.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

arity-0.14.0-py3-none-win_arm64.whl (4.3 MB view details)

Uploaded Python 3Windows ARM64

arity-0.14.0-py3-none-win_amd64.whl (4.5 MB view details)

Uploaded Python 3Windows x86-64

arity-0.14.0-py3-none-musllinux_1_2_x86_64.whl (4.6 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

arity-0.14.0-py3-none-musllinux_1_2_aarch64.whl (4.3 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

arity-0.14.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.6 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

arity-0.14.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.3 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

arity-0.14.0-py3-none-macosx_11_0_arm64.whl (4.2 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

arity-0.14.0-py3-none-macosx_10_12_x86_64.whl (4.4 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file arity-0.14.0.tar.gz.

File metadata

  • Download URL: arity-0.14.0.tar.gz
  • Upload date:
  • Size: 924.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for arity-0.14.0.tar.gz
Algorithm Hash digest
SHA256 6cc0f85bff815fb1b6cb95ef595764fa818fb7c964504f561d4e2fe64255b24d
MD5 5aac6f68c1a396b4a3ab799ec314625c
BLAKE2b-256 799e878b789b25659404ee4e087140066c4dfecad2167e9dc3d06baa5fe2500c

See more details on using hashes here.

Provenance

The following attestation bundles were made for arity-0.14.0.tar.gz:

Publisher: publish-pypi.yml on jolars/arity

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arity-0.14.0-py3-none-win_arm64.whl.

File metadata

  • Download URL: arity-0.14.0-py3-none-win_arm64.whl
  • Upload date:
  • Size: 4.3 MB
  • Tags: Python 3, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for arity-0.14.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 d40b8dab12bef546a9648a04e13c7291ab1804c6c37958ee825c74ec81b37d6f
MD5 8ad44be0405c8e5f40d1e002946ccdf6
BLAKE2b-256 a880244493c064bfe925dd15743cd802c0fe3b5edb09947ebe439aaffb5462f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for arity-0.14.0-py3-none-win_arm64.whl:

Publisher: publish-pypi.yml on jolars/arity

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arity-0.14.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: arity-0.14.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 4.5 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for arity-0.14.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 2e555b7ad0e936b691817b18a1fe2b8c43160550df373babeb883a98ea7b53dc
MD5 bbaf6a870c1253d292621eece747e8cb
BLAKE2b-256 d9d604e97668e3847a44d7d3f730a53eef777d67d1890d34945c98ed6269c777

See more details on using hashes here.

Provenance

The following attestation bundles were made for arity-0.14.0-py3-none-win_amd64.whl:

Publisher: publish-pypi.yml on jolars/arity

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arity-0.14.0-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for arity-0.14.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5026ab878907f36ba6555397c6124ed4cdca7adb37dc299e83399ae0ded7c71c
MD5 f88aa6f0a5606869591191cd0a7c27f5
BLAKE2b-256 90f9fb6d5635c25a78f6f2fddcc7deacd4a3aed2979779dfe8db8c9ad7b987e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for arity-0.14.0-py3-none-musllinux_1_2_x86_64.whl:

Publisher: publish-pypi.yml on jolars/arity

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arity-0.14.0-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for arity-0.14.0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 97391df23dc78c4291c1b72368f8a071f36a1d1fa164add276997893885ea7bf
MD5 327938b59f6f8a0b731d737b98188aa2
BLAKE2b-256 0cb5c8337b654441c67a8c0a5f4295ba96e6e5490c51f757e0336e14c5782b3e

See more details on using hashes here.

Provenance

The following attestation bundles were made for arity-0.14.0-py3-none-musllinux_1_2_aarch64.whl:

Publisher: publish-pypi.yml on jolars/arity

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arity-0.14.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for arity-0.14.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e371bf70d6aab4fced99c267fe675414a04ba0d1ab843b9c962fb8a01240797d
MD5 df189a1a50050eb028f777006f17a630
BLAKE2b-256 c674dd46e0db0ec048a3cb29552705ef4acb1022c17b59147eaae61300d59b10

See more details on using hashes here.

Provenance

The following attestation bundles were made for arity-0.14.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-pypi.yml on jolars/arity

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arity-0.14.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for arity-0.14.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 78fdf1df0cbbcbe572cec295884fb6e5dedb4c6c9c74dc610762cf585d348727
MD5 f0a7d86ea011660f46470df297a4329e
BLAKE2b-256 00875e7512378d9600bdafba1ec86a9d4925456d7bbb3671cf3890648d9c57f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for arity-0.14.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: publish-pypi.yml on jolars/arity

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arity-0.14.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for arity-0.14.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 360376adf0aa21701e6fedb3e464c1f042e115af2a627ba3125a4be8f4050ec4
MD5 e05a086d14ea69ca6f8a300f038122c5
BLAKE2b-256 00e4734ded6a8fcb9dee3b0e06501a5605e863a83ae1ac2db5a4e77bab927d2d

See more details on using hashes here.

Provenance

The following attestation bundles were made for arity-0.14.0-py3-none-macosx_11_0_arm64.whl:

Publisher: publish-pypi.yml on jolars/arity

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arity-0.14.0-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for arity-0.14.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7d6678bfdb34a4baade89e5d4a53510c578fe1f25ca313d9f7720e2425d83b5f
MD5 f1f5aa80ac429adcc37e99153d7b9d96
BLAKE2b-256 4236d857f97bffed907ccd7ca8f95a5c98429b10e8c3fdac6703e4af9284d3b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for arity-0.14.0-py3-none-macosx_10_12_x86_64.whl:

Publisher: publish-pypi.yml on jolars/arity

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page