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)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| hapax_lsp-0.1.2.tar.gz | 24.7 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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 logRelease 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 logSecurity 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.
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 logA 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.