j
jaipkg.dev
packages / tool / jai-lsp

jai-lsp

v0.1.0tool

Jai LSP

MIT · updated 3 weeks ago

jai-lsp

A Language Server Protocol implementation for the Jai programming language, written in Jai. Speaks LSP over stdio so any LSP-capable editor can drive it.

Ships with integrations for VSCode, Zed, Emacs, and Neovim.

Features

Hover with types · Go to definition / type definition (incl. into imported modules) · Find all references · Document outline · Workspace symbol search (⌘T) · Code completion (incl. imported module symbols & named-import members like B.tprint) · Code formatting · Signature help · Inlay hints · Semantic-token highlighting · Folding ranges · Real compiler diagnostics on save (clear automatically as you fix them).

Install

Each editor has its own setup — pick yours:

Editor Where
VSCode Install the .vsix from the latest release
Zed zed-extension/README.md
Neovim nvim/README.md
Emacs emacs/README.md

Every editor expects two settings:

  • jai-lsp.compilerPath — absolute path to your Jai compiler binary
  • jai-lsp.entryFile — your project's main file (required for diagnostics, and for AST-backed features like definition/completion into imported modules)

The server is silent on stderr by default. To see request/response logs when debugging, set your client's LSP trace to verbose, or launch the server with JAI_LSP_LOG=trace (error | info | trace).

Build from source

You need the Jai compiler installed.

jai build.jai          # produces ./jai-lsp (jai-lsp.exe on Windows)

For per-platform extension binaries, see RELEASING.md.

Credits

The vendored tree-sitter grammar in tree-sitter-jai/ was originally written by constantitus and is included under its MIT-0 license.

License

MIT © Jacob Davis.