summaryrefslogtreecommitdiff
path: root/docs/lsp.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/lsp.md')
-rw-r--r--docs/lsp.md19
1 files changed, 10 insertions, 9 deletions
diff --git a/docs/lsp.md b/docs/lsp.md
index 82586344..ae350156 100644
--- a/docs/lsp.md
+++ b/docs/lsp.md
@@ -1,8 +1,9 @@
# Language intelligence
Native hosts, including detached sessions, run language queries on workers.
-Zig uses the linked ZLS analyser; other languages use the protocol client in
-`src/lsp/lsp_client.zig`. Web and board builds have no language backend.
+Every language, Zig included, goes through the protocol client in
+`src/lsp/lsp_client.zig`, which runs its server as a child process: Zig's is
+`zls`, which must be on PATH. Web and board builds have no language backend.
`Lspinfo` (`SPC l i`) reports backend versions, server state, capabilities,
recent timings and errors. `Lspwhy` (`SPC l w`) traces resolution at the cursor.
@@ -37,14 +38,13 @@ without starting a query.
Formatting and same-file rename apply as one undo transaction. A workspace
rename spanning other files opens a preview; it does not partially apply the
-rename. The linked Zig analyser resolves current-file references and relative
-imports, but does not run the build runner to discover dependency modules.
+rename.
## Configuration and testing
-`PARDES_LSP_RS`, `_C`, `_GO`, `_TS` and `_PY` override the server executable
-for each language. An empty value disables that server. `ZIG_LIB_DIR` overrides
-the stdlib path recorded at build time. `Lspinfo` shows the effective settings.
+`PARDES_LSP_ZIG`, `_RS`, `_C`, `_GO`, `_TS` and `_PY` override the server
+executable for each language. An empty value disables that server. `Lspinfo`
+shows the effective settings.
The protocol client keeps one child server per configured language, negotiates
position encoding, and handles both push and pull diagnostics. Startup and
@@ -52,8 +52,9 @@ request waits have deadlines; failed starts back off before retrying. Worker
status messages reach the host event queue.
`zig build lspprobe -- gd <file> <line>:<column>` queries the same backend from
-the command line. `zig build lspbench` measures it. Snapshot tests use a Zig
-mock server with deterministic answers while exercising the real client,
+the command line. `zig build lspbench` measures it. The Zig snapshot tests
+(lsp, lspcomplete, lspdebug and the rest) run the real `zls`; the protocol
+ones use a Zig mock server with deterministic answers while exercising the real client,
including process startup, framing, edits and undo. `zig build fs-test` also
checks language-worker delivery in TTY and detached sessions over 9P.