sigil-lsp
Language Server Protocol implementation for Sigil. Provides diagnostics, hover, completion, go-to-definition, formatting, and code actions for Sigil source files, exposed over LSP 3.17 / JSON-RPC 2.0 on stdio.
Invoked by editors through sigil lsp serve (registered as a subcommand of sigil-cli).
Modules
| Module | Purpose |
|---|---|
(sigil lsp) | Top-level lsp-serve entry point |
(sigil lsp server) | Server loop and method dispatch |
(sigil lsp protocol) | JSON-RPC 2.0 framing and message shapes |
(sigil lsp documents) | In-memory document cache keyed by URI |
(sigil lsp positions) | 0-based line/character helpers |
(sigil lsp diagnostics) | Parse errors + lint warnings as LSP diagnostics |
(sigil lsp hover) | Hover provider via (sigil docs) |
(sigil lsp completion) | Completion provider via (sigil docs) |
(sigil lsp definition) | Go-to-definition via module resolution |
(sigil lsp formatting) | Document and range formatting via (sigil format) |
(sigil lsp code-actions) | Quick-fix code actions (import, unused import) |
(sigil lsp lint) | Lint warnings carrying source positions |
(sigil lsp commands) | sigil lsp CLI subcommand registration |
Usage
(import (sigil lsp))
(lsp-serve)
(lsp-serve log-file: "/tmp/sigil-lsp.log" log-level: 'debug)Or from the command line via sigil-cli:
sigil lsp serve sigil lsp serve --log-file /tmp/sigil-lsp.log --log-level debug
Build and test
sigil deps install sigil build sigil test --report
Local development against an unreleased sigil monorepo:
sigil deps install --redirects ./dev-redirects.sgl sigil build --redirects ./dev-redirects.sgl
License
BSD-3-Clause. See LICENSE in the sigil monorepo for the canonical copy.
$ git clone https://codeberg.org/sigil/sigil-lsp
v0.16.1 — latest by version, released 28 Jun 2026
All releases — 9 tags in this repository.
One page per file, and every line has a permalink.
e68ac602
add5c879
3d784f43
The last 20 commits keep a page here. Everything older lives in the clone.