Language Server (jaxlint[lsp])#
jaxlint ships an optional diagnostics-only language server for editors that speak LSP over stdio. This is v1 scope: publish diagnostics from the same rules as jaxlint check (performance sensors, doc sections, MathJax). Formatting, code actions, completions, and HLO analysis are out of scope for the server.
Install#
The server depends on Pygls (pulled in by the lsp extra):
uv sync --extra lsp
# or when installing the package
pip install 'jaxlint[lsp]'
Run#
jaxlint-lsp— console script from[project.scripts](same aspython -m jaxlint.lsp).python -m jaxlint.lsp— module entrypoint.
Wire your editor to launch one of the above with stdio transport. There is no TCP or socket mode in this release.
Environment & lifecycle#
Environment variable#
Variable |
Meaning |
Default |
|---|---|---|
|
Milliseconds to debounce |
200. Set to |
No other JAXLINT_* environment variables are read by the server (as of 0.1.0a1).
Lifecycle (not configurable via env)#
Topic |
Behaviour |
|---|---|
|
Diagnostics run immediately (no debounce). |
|
Debounced by |
|
Publishes empty diagnostics for the URI and cancels any pending debounced work so editor squiggles clear. |
URIs |
|
Diagnostics, sync, and configuration#
Topic |
Detail |
|---|---|
Diagnostics |
In-memory lint of the open buffer; results are published as LSP diagnostics. |
Document sync |
Full text sync ( |
Configuration |
Resolved with |
Disk cache |
Not used. The LSP path calls |
CLI overrides |
There is no |
Library hook#
For tests or custom tooling, use jaxlint.core.diagnostics_for_python_source: same diagnostics as run_checks for a given path and source string, sorted and without touching the on-disk cache. See Library usage.
See also#
CLI reference — terminal workflow and
jaxlint checkflags (including cache and overrides the LSP does not expose).