Language support for Kinglet (.kl) and kinglet.nest project manifests — syntax highlighting, diagnostics, completion, and a fast, native language server.
- Diagnostics — real-time parser and type-checker errors as you type
- Completion — context-aware, parser-driven suggestions
- Go to Definition — jump to where a symbol is declared
- Hover — types and documentation on hover
- Document Symbols — outline view and breadcrumbs
- Signature Help — parameter hints while you call functions
- Semantic Tokens — precise, type-aware highlighting
- Syntax Highlighting — TextMate grammar for
.klfiles andkinglet.nestproject manifests - Manifest Diagnostics — real-time validation of
kinglet.nestmodules, targets, build, and fmt blocks - Manifest Completion — context-aware suggestions for module names, paths, backends, and formatter extensions
The language server is written in C++ and reuses the official Kinglet compiler frontend, so diagnostics match the compiler exactly.
- Install the extension.
- Open any
.klfile — the language mode (bottom-right) switches to Kinglet. Open akinglet.nestfile — the language mode switches to Kinglet Nest. - The language server starts automatically; a Perch indicator appears in the status bar once it is up.
Perch ships with a matching
kinglet-lspbinary, so no extra setup is required on supported platforms. To use your own build, setkinglet.lspPath.
| Setting | Default | Description |
|---|---|---|
kinglet.lspPath |
kinglet-lsp |
Path to the Kinglet language server binary. |
kinglet.trace.server |
off |
LSP trace verbosity (off, messages, verbose). |
| Command | Description |
|---|---|
| Perch: Show Language Server Log | Open the Perch output channel. |
| Perch: Restart Language Server | Restart the Kinglet language server. |
- File opens as Plain Text — set the language mode (bottom-right) to Kinglet
(or Kinglet Nest for
kinglet.nestmanifests), or ensure the file has the right extension / filename. - No diagnostics / completion — run Perch: Show Language Server Log to
check the server started. For detailed RPC traces, set
"kinglet.trace.server": "verbose". - Custom server — point
kinglet.lspPathat your ownkinglet-lspbinary.
Building the language server from source, packaging the VSIX, and the repo layout are documented in CONTRIBUTING.md.