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

Requires Python 3.13+.

uv tool install 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+)

This repo is also a Neovim plugin. Install it with your plugin manager and enable the server, for example with lazy.nvim:

{ "claytron/hapax-lsp", config = function() vim.lsp.enable("hapax") end }

Instrument definitions are .txt files, so ftdetect/hapax.lua marks a .txt buffer as hapax when its first non-comment line is a whole directive (VERSION 1, TRACKNAME My Synth, TYPE POLY, ...) or a section header like [CC]. 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.2

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.2
File Size Uploaded Provenance
hapax_lsp-0.1.2.tar.gz 24.7 kB With provenance Details

Built distribution (wheel)

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

Total release size: 30.7 kB

Release files / hapax_lsp-0.1.2.tar.gz

Download URL hapax_lsp-0.1.2.tar.gz
Size 24.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0a108c3414a7e539b1396306d7c884179b86a7e79ee2488eab06f9cd2ea40d21
BLAKE2b-256 checksum
How to use checksums
e23634bb6c5e0c5bd9e78e5f8d92200dc1b9cedd7996f091208add43ed3cc9f0
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.2-py3-none-any.whl

Download URL hapax_lsp-0.1.2-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
df10fcaa2fdcccd32fb77c7b77e89c7fd4c4a270fa62e9d2d4dae2d4a206e448
BLAKE2b-256 checksum
How to use checksums
c74cc82b98463e5cb382db8c0fd6e509f3ae7990ab5476a46cedfe14730c6ffa
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.2

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.2.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.2 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