summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/lsp-evaluation.md55
1 files changed, 28 insertions, 27 deletions
diff --git a/docs/lsp-evaluation.md b/docs/lsp-evaluation.md
index 6aa58409..0812ebf0 100644
--- a/docs/lsp-evaluation.md
+++ b/docs/lsp-evaluation.md
@@ -2,7 +2,8 @@
Same core, same seam (`src/lsp/lsp.zig`), same harness (`zig build lspbench`)
over the same corpus — 17 probes at the time, 22 today. Three jj workspaces,
-three independent implementations, one function each. C landed; see
+three independent implementations, one function each. C landed first and
+went in 0.6; the tree has B's kind of client alone, for every language. See
**Decision** below.
> **This is a dated report, not a description of the tree.** Every MEASUREMENT
@@ -10,7 +11,8 @@ three independent implementations, one function each. C landed; see
> because renumbering a comparison nobody can re-run turns a record into a
> guess. What has moved since, re-checked 2026-08-26: `lspbench` now has **22**
> probes rather than 17 (the dot-completion work added five),
-> `src/lsp/lsp_zls.zig` has grown from 540 lines to **1 432**,
+> `src/lsp/lsp_zls.zig` had grown from 540 lines to **1 432** (1 522 when it
+> went, 2026-09-29),
> `test/snapshots/` holds **95** scripts rather than 56 (`.snap` + `.golden`
> pairs), and the differential suites are `hxdiff` **481** (`cases.jsonl`) and
> `hxparity` **561** (`cases.jsonl` + the 80 editing extras in
@@ -98,34 +100,33 @@ real binary through the helix keymap, and pass `hxdiff` (360) and `hxparity`
## Decision
-**C landed.** It is what `src/lsp/lsp_zls.zig` is, and ZLS is now a fetched
-dependency (`build.zig.zon`, pinned to commit `3e0d0820` on the 0.16.x branch)
-so it sits in `zig-pkg/` like everything else and the build is reproducible
-from the .zon alone — no path dependency on a local checkout. The same commit
-is spelled a second time in `build.zig` as `const zls_version =
-"0.16.1-dev+3e0d0820"`, for ZLS's own `-Dversion-string`; the semver half
-exists nowhere in the manifest, so the duplication cannot be removed, but a
-`comptime` block beside the constant `@compileError`s unless the two name the
-same commit. See `docs/typ/building.typ`.
+**One protocol client, for every language, Zig's included.** C landed first
+(`src/lsp/lsp_zls.zig`, ZLS a fetched dependency pinned in `build.zig.zon`).
+The multi-language argument below won on 2026-09-01, when a protocol client,
+`src/lsp/lsp_client.zig`, arrived beside it, and on 2026-09-29 (change
+`kvlpprms`, released in 0.6) the in-process backend went: Zig files ask a
+`zls` found on `PATH` as every other language asks its server, the ZLS
+source and its build wiring left the tree, and the binaries shrank (ReleaseFast
+105.35 to 96.28 MB, Debug 296.5 to 245.9 MB, measured then; the table's
++35 MiB was C's over the base it was built on). The last trace of the two
+backends, Lspinfo's `backend: lsp-client` line, went on 2026-11-05.
-A and B were not deleted, only un-worktree'd. They remain whole commits:
+The client is not `stuurqqt` resurrected: B pumped the socket only while a
+query waited, which cannot carry an indexing server's `$/progress` or
+unsolicited diagnostics, so the client has a reader thread per server and a
+status sink narrating server state onto the transient message row. B's
+transport bones (socketpair, deadline-bounded writes, MSG_NOSIGNAL,
+believe-the-server encoding) survive in it; its header is the design.
-- **A · stdlib** — change `nvqpknzm`
-- **B · client** — change `stuurqqt`
+What a user must have installed, each on `PATH` (or named by its variable,
+docs/typ/setup.typ): `zls` for `.zig` (one built for the Zig the project
+uses), `rust-analyzer` for `.rs`, `clangd` for C and C++, `gopls` for Go,
+`typescript-language-server` for TypeScript and JavaScript,
+`pyright-langserver` for Python. A file whose server is missing is said so
+once, and its language words answer `language server for .x not found`.
-Both are one `jj new <change>` away if the multi-language argument below wins
-later, or if the ZLS coupling ever needs backing out.
-
-> **Addendum, 2026-09-01.** The multi-language argument won. The tree now has
-> a REAL protocol client beside the in-process analyser —
-> `src/lsp/lsp_client.zig`, routed per file by the seam — but it is a new
-> implementation, not `stuurqqt` resurrected: B pumped the socket only while
-> a query waited, which cannot carry an indexing server's `$/progress` or
-> unsolicited diagnostics, so the client has a reader thread per server and a
-> status sink narrating server state onto the transient message row. B's
-> transport bones (socketpair, deadline-bounded writes, MSG_NOSIGNAL,
-> believe-the-server encoding) survive in it. See "The protocol client" in
-> docs/typ/building.typ.
+A (`nvqpknzm`), B (`stuurqqt`) and C's last state (the parent of
+`kvlpprms`) remain whole commits.
## Recommendation (as written before the decision)