Skip to main content

Badness

Build and Test Documentation Open VSX VS Code

Badness is a language server, formatter, and linter for LaTeX, built on a lossless concrete syntax tree.

It parses LaTeX once and serves three tools from that tree:

  • Formatter (badness format): deterministic, rule-based layout.
  • Linter (badness lint): diagnostics with source snippets.
  • Language server (badness lsp): both, live in your editor.

The architecture follows rust-analyzer: a generic, error-tolerant, hand-written parser produces a lossless tree, semantics are layered on top as a separate concern, and recomputation is incremental. badness never requires resolving macros or catcodes to succeed—anything it cannot statically recognize degrades to generic nodes rather than a crash. Two properties hold by construction and are enforced as tests: losslessness (the tree reconstructs the input byte-for-byte) and idempotence (formatting an already formatted file changes nothing).

Installation

Badness is available from several sources:

  • crates.io: cargo install badness
  • npm: npm install -g badness (bundles a prebuilt binary)
  • PyPI: uv tool install badness/pipx install badness
  • Prebuilt binaries: from the releases page
  • VS Code/Open VSX: the Badness extension (also works in Positron and Cursor)
  • From source: cargo install --path . in a checkout

The VS Code/Open VSX extension bundles the badness binary and starts the language server automatically when you open a .tex file.

Usage

# Format a file in place (or stdin → stdout with no path)
badness format paper.tex

# Verify formatting without writing—exits non-zero if anything would change
badness format --check paper.tex

# Lint, reporting parse diagnostics
badness lint paper.tex

# Run the language server over stdio
badness lsp

Formatting is configurable via a TOML file named badness.toml. See the documentation for the full reference.

The language server runs over stdio (badness lsp); see the editor setup guide for Neovim and VS Code wiring.

Documentation

Full documentation lives at https://badness.dev/ (built with mdBook from docs/).

Contributing

See CONTRIBUTING.md.

License

MIT

Download files

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

Source Distribution

badness-0.11.0.tar.gz (1.5 MB view details)

Uploaded Source

Built Distributions

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

badness-0.11.0-py3-none-win_arm64.whl (2.9 MB view details)

Uploaded Python 3Windows ARM64

badness-0.11.0-py3-none-win_amd64.whl (3.1 MB view details)

Uploaded Python 3Windows x86-64

badness-0.11.0-py3-none-musllinux_1_2_x86_64.whl (3.3 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

badness-0.11.0-py3-none-musllinux_1_2_aarch64.whl (3.0 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

badness-0.11.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

badness-0.11.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

badness-0.11.0-py3-none-macosx_11_0_arm64.whl (2.9 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

badness-0.11.0-py3-none-macosx_10_12_x86_64.whl (3.1 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file badness-0.11.0.tar.gz.

File metadata

  • Download URL: badness-0.11.0.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for badness-0.11.0.tar.gz
Algorithm Hash digest
SHA256 257adf5b53f99b522f4eee1d901ea0b2a451b73977fe7346ca34fbb8bdf4f7d1
MD5 c2f85977e2729f4902e2f3f049dc4ca9
BLAKE2b-256 c4a622667939ab6a3864534d218f36a7507516535aa1d09158e8bb06beb07f02

See more details on using hashes here.

Provenance

The following attestation bundles were made for badness-0.11.0.tar.gz:

Publisher: publish-pypi.yml on jolars/badness

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

File details

Details for the file badness-0.11.0-py3-none-win_arm64.whl.

File metadata

  • Download URL: badness-0.11.0-py3-none-win_arm64.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: Python 3, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for badness-0.11.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 aee4635508d666fa8db9f3c127b7eea59933d44ac68de80b31c1a52faffd44b4
MD5 180fbb01e27a2fa605bcd2c0cf0bb9c6
BLAKE2b-256 adfda6a5ed472a1975445a4cdcb8176d68e08654416e282b71585932f034a00e

See more details on using hashes here.

Provenance

The following attestation bundles were made for badness-0.11.0-py3-none-win_arm64.whl:

Publisher: publish-pypi.yml on jolars/badness

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

File details

Details for the file badness-0.11.0-py3-none-win_amd64.whl.

File metadata

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

File hashes

Hashes for badness-0.11.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 0631f6efad83c47d40495293542183fe38948c1892722c93cdca92b84c621ced
MD5 20f4e7102706eba20a942f85551f913c
BLAKE2b-256 d20f839ff274d38aa5b53967659bee0ffbf6c2740f9f8e3b48bd24d1174c00f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for badness-0.11.0-py3-none-win_amd64.whl:

Publisher: publish-pypi.yml on jolars/badness

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

File details

Details for the file badness-0.11.0-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for badness-0.11.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 83582ba78c38a313656101771fb5c7921d5cff011956bd0874a03a91a3459fb3
MD5 16e70c7781e038bc1614a209c02bac90
BLAKE2b-256 405b84b17dfcbdfc86c9f5d2f87386809daabb46495363dd6ca6ee65a3571cef

See more details on using hashes here.

Provenance

The following attestation bundles were made for badness-0.11.0-py3-none-musllinux_1_2_x86_64.whl:

Publisher: publish-pypi.yml on jolars/badness

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

File details

Details for the file badness-0.11.0-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for badness-0.11.0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 1bbc9934668ad8b94ffd3232e15de6e0b11c38e4386fc84f42c97bdb69a044cb
MD5 9fe4ed983e128069e890d6ba9a2939bc
BLAKE2b-256 9883dd9ac3ce457c7432b2aaefb76c8f630fe1451af13646501aa453b5957f1d

See more details on using hashes here.

Provenance

The following attestation bundles were made for badness-0.11.0-py3-none-musllinux_1_2_aarch64.whl:

Publisher: publish-pypi.yml on jolars/badness

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

File details

Details for the file badness-0.11.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for badness-0.11.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9cb7b749145cb5c1a41847141f42329a2ea9e3a740a1dd0d1f73127ed30cda14
MD5 9865bc8a74c997f61ee15084feef942a
BLAKE2b-256 f484d64c246271225cc8db35c8e595f0b7efdd0ee808652c6d62d6fbce106efc

See more details on using hashes here.

Provenance

The following attestation bundles were made for badness-0.11.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-pypi.yml on jolars/badness

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

File details

Details for the file badness-0.11.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for badness-0.11.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4f7223e7d43635576ac6bc3c56bacff9632a801c1675996d35c2cf2049287393
MD5 813942d3da2d5400ecf4dd60412592a5
BLAKE2b-256 adc0709e865d5f06ce42fec7e1606e3cb6ded5b3f7d189c80122fe32d9a4aff4

See more details on using hashes here.

Provenance

The following attestation bundles were made for badness-0.11.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: publish-pypi.yml on jolars/badness

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

File details

Details for the file badness-0.11.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for badness-0.11.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b2887f0795b2bb27df83837383aa8724ce58ad5a022d1c23a94ec5d2f0aeb060
MD5 ebdeb7276f4f21694f8763cd61bb3a16
BLAKE2b-256 6abaa61c33ce4c03ef8be08e459f20106a0597fe84a3813d00b69465c40f2c14

See more details on using hashes here.

Provenance

The following attestation bundles were made for badness-0.11.0-py3-none-macosx_11_0_arm64.whl:

Publisher: publish-pypi.yml on jolars/badness

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

File details

Details for the file badness-0.11.0-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for badness-0.11.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9c5149db7962267271bbacff7f32361aeb41858d8ecc49d000ccd416339123be
MD5 1acc0ff5ecc1a3e04ac892d6aba8b263
BLAKE2b-256 299943a68cf8cae8e3566b9541042d35815059f8243d2ff39d0902b08cc087e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for badness-0.11.0-py3-none-macosx_10_12_x86_64.whl:

Publisher: publish-pypi.yml on jolars/badness

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 Sentry Error logging StatusPage Status page