📝 Document the protocol-backed LSP helper

Note that the autocomplete helper drives the server through
vscode-languageserver-protocol, cross-link the tooling decision, and replace
the obsolete string-id known issue with the benign context-canceled stderr
the Go server emits on shutdown.
This commit is contained in:
tmu committed 2026-09-18 07:16:45 +00:00
1 parent 9f56d7ae8e
commit 998c4bfd80
1 file changed
+8 -3
+8 -3
View File
@@ -134,7 +134,10 @@ The script prints the labels the server offers at a `/*COMPLETE*/` marker inside
is imported by `src/util/__tests__/lsp-completion.test.ts` — which tests the is imported by `src/util/__tests__/lsp-completion.test.ts` — which tests the
helper itself against inline documents, never the library's code — and by helper itself against inline documents, never the library's code — and by
`src/primitive.test.ts`, where the same probe asserts the matcher's popup; `src/primitive.test.ts`, where the same probe asserts the matcher's popup;
the CLI is for manual inspection. the CLI is for manual inspection. It speaks to the server through
`vscode-languageserver-protocol`'s message connection and typed requests, so the
transport and protocol plumbing are not hand-rolled (see
[tooling.md § `vscode-languageserver-protocol` backs the autocomplete helper](./tooling.md#vscode-languageserver-protocol-backs-the-autocomplete-helper)).
#### Why #### Why
@@ -162,8 +165,10 @@ the CLI is for manual inspection.
any order; the file is an integration test (~1.6 s) that needs `node_modules`. any order; the file is an integration test (~1.6 s) that needs `node_modules`.
`didOpen` is handled in order before the completion request, so no settle `didOpen` is handled in order before the completion request, so no settle
delay is needed. delay is needed.
- The server answers some requests with a string id (`client/registerCapability`); - The Go server logs `context canceled` on stderr once per server as it shuts
the client must tolerate `string | number` ids or the server stalls. down (nine lines per `test:unit` run). It is benign and predates the protocol
client — the hand-rolled client produced the same line — so it is left as is
rather than filtered out of the server's stderr.
## Known issues ## Known issues