Skip to main content

Badness

Build and Test Lint 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.10.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.10.0-py3-none-win_arm64.whl (2.9 MB view details)

Uploaded Python 3Windows ARM64

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

Uploaded Python 3Windows x86-64

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

Uploaded Python 3musllinux: musl 1.2+ x86-64

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

Uploaded Python 3musllinux: musl 1.2+ ARM64

badness-0.10.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.10.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

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

Uploaded Python 3macOS 11.0+ ARM64

badness-0.10.0-py3-none-macosx_10_12_x86_64.whl (3.0 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: badness-0.10.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.12

File hashes

Hashes for badness-0.10.0.tar.gz
Algorithm Hash digest
SHA256 21c88acd38e3122a58777062837417652bf346b5e0e039beea64156b17e807b8
MD5 72c3ff7dcf44a0ab3d482b09f0febec2
BLAKE2b-256 f4accd1de2a92a660552cdc32f897e6b1d02d759651871a34a61e645bf075dad

See more details on using hashes here.

Provenance

The following attestation bundles were made for badness-0.10.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.10.0-py3-none-win_arm64.whl.

File metadata

  • Download URL: badness-0.10.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.12

File hashes

Hashes for badness-0.10.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 1e113d1149ed83218c8c57a8b9a6ae5d7e684eece984c6939891c80fdc2ec37d
MD5 39f92d3bc8c340460f7a392d16af6b66
BLAKE2b-256 ef1aa7e41a84700b99e10240bc223ebab659c68445f07ec5aa7354ef024fce74

See more details on using hashes here.

Provenance

The following attestation bundles were made for badness-0.10.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.10.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: badness-0.10.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.12

File hashes

Hashes for badness-0.10.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 dcfa7094a9113d56f408f2a599c415119d332427802275e3b9e191488c980fcb
MD5 439af615212585b40a4c0e81a0db68d2
BLAKE2b-256 159e64499fddc5efe9bd925d7049cac0ee559f2b96528dd3ccf42e370e974d56

See more details on using hashes here.

Provenance

The following attestation bundles were made for badness-0.10.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.10.0-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for badness-0.10.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 51eaca29d4727963a9517b6c8b9e8ca6c28c5d23e8cf672102d3f2b9e285fe59
MD5 cebbe92f9bf28210a0a767ffaabdf721
BLAKE2b-256 b4503ad0226e704e585d3891ba65e1aca7fd91c0061e2feb4b394aef637d4cfc

See more details on using hashes here.

Provenance

The following attestation bundles were made for badness-0.10.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.10.0-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for badness-0.10.0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 098c59c42274680d1932c4e79bf8c50e1640ef982e272f8958ba38ec1f1d27ed
MD5 56ee4b61753ac7a2d493ca7bf1bc570f
BLAKE2b-256 bcba266b60b85c609a774b616ef519541b9f7691e07dfcf20ed3503d5d4e8aef

See more details on using hashes here.

Provenance

The following attestation bundles were made for badness-0.10.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.10.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for badness-0.10.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 96efa3e235d35dd36204163fe29f9a6afe4ca3e9fa8c109d2f5cdea222c6226e
MD5 a44e5ba3c0764eccbb5e65592b4843c8
BLAKE2b-256 22dc4bf82b99108df74c500df5864b19dd25845d8ed6ef4469448816ec676e8a

See more details on using hashes here.

Provenance

The following attestation bundles were made for badness-0.10.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.10.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for badness-0.10.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 882afbe8a124fda431f9c72511c1d7c5328339529bb27b5989d4cab84d2820fa
MD5 eba72c77a82e70a74c027bd2182a1f21
BLAKE2b-256 411b9215a9035e3d962486886a24951df56d24b54f853af28c143da5983cd246

See more details on using hashes here.

Provenance

The following attestation bundles were made for badness-0.10.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.10.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for badness-0.10.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 84d3b18ff66a6b379e70e0b4bb8e50300a0e94d6fc42cc3e635598ea9865d337
MD5 6c14bd0540f45488551720fdaceb4b49
BLAKE2b-256 cd36c3433bc3e1b4ca9b2200f6ba921b596ffd5c9f49da16456063eb32638a6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for badness-0.10.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.10.0-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for badness-0.10.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9c491e14c49b9380034c8b7a2611fe2faae45e19dba4af83bd2f3d4e15d6b118
MD5 61857ce3904c362f7bb741140274693d
BLAKE2b-256 69acada2483a8c066aed001a703b587b14bdc64dfdc6b0a5e02aa343ca80c148

See more details on using hashes here.

Provenance

The following attestation bundles were made for badness-0.10.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