Skip to main content

hapax-lsp

A language server for Squarp Hapax instrument definitions: diagnostics, highlighting, completion and a fix-all action, in any editor with an LSP client. Validation comes from hapax-tui, so the editor reports exactly what hapax validate reports.

Install

uv tool install git+https://github.com/claytron/hapax-lsp

This puts hapax-lsp on your PATH; it speaks LSP over stdio.

Settings

Setting Default Meaning
fw 3.21 Target Hapax OS, 1.12 to 3.21
warn warn in ~/.config/hapax/config.toml, else true Report warnings as well as errors

Send them as initializationOptions, or as workspace/didChangeConfiguration settings under a hapax key.

Neovim (0.11+)

Add the bundled runtime directory and enable the server:

vim.opt.runtimepath:append("/path/to/hapax-lsp/editors/nvim")
vim.lsp.enable("hapax")

Instrument definitions are .txt files, so ftdetect/hapax.lua marks a .txt buffer as hapax when its first non-comment line is a directive (VERSION, TRACKNAME, TYPE, ...) or a section header. Other .txt files stay text. Highlighting comes from semantic tokens, linked to your colour scheme's @lsp.type.* groups. Run the fix-all action with vim.lsp.buf.code_action().

Other editors

Map Hapax .txt files to a hapax language however your editor allows, for example by the directory you keep instruments in, and run hapax-lsp for it.

Development

uv sync
uv run pytest

Metadata

Release files for hapax-lsp 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hapax-lsp 0.1.1
File Size Uploaded Provenance
hapax_lsp-0.1.1.tar.gz 24.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for hapax-lsp 0.1.1
File Interpreter ABI Platform
hapax_lsp-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 30.5 kB

Release files / hapax_lsp-0.1.1.tar.gz

Download URL hapax_lsp-0.1.1.tar.gz
Size 24.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a0b0497cf565759e93726407604bc07a78e82bcfc7ff29cb62395537596faf24
BLAKE2b-256 checksum
How to use checksums
f842d31cb38ceccdb3a76fa82141c86bbdb01570956a378b3668fb9ae62ef0d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Release files / hapax_lsp-0.1.1-py3-none-any.whl

Download URL hapax_lsp-0.1.1-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b8996788efeda12aa0307a4c2ea74d459b4e806d8a6478885961b407a4a3bfbc
BLAKE2b-256 checksum
How to use checksums
87cee8d0fdb1c5802ca212253f534bc1d2a48214fc06261b7c162a5e8e002910
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Security for hapax-lsp 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for hapax_lsp-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page