Skip to main content

Module documentation_request

Module documentation_request 

Source
Expand description

#847: bynk/documentationModel — the documentation-view custom LSP request.

The second custom request in this server (after #846’s bynk/sequenceModel), and the same posture: no workspace/*/refresh nudge exists for a custom method and none is needed — Tier 1 is on-demand, the client re-issues the request each time “Bynk: Show Documentation” fires (Decision D).

Unlike bynk/sequenceModel, the request carries no cursor position: a documentation page is the whole unit’s declarations, so the params are a bare TextDocumentIdentifier. The page was file-scoped (Decision A) until #1885, which merges every file of a multi-file unit (documentation_model_for). The wire shape is a plain serde mirror of bynk_ide::documentation::DocModel, each Span lowered to an LSP Range against the committed snapshot text of the file it is in — the same convention sequence_request/SerKey use — with a per-entry uri naming that file (the {uri, range} pattern architecture_request uses).

Structs§

DocumentationModelParams
The bynk/documentationModel request payload. A bare text-document identifier — no cursor position (the page is the whole unit).
WireDocEntry
WireDocModel

Functions§

documentation_model_for
#1885: the wire page for the document at rel (project-relative), merged across every file of its unit. The unit’s files come from the round’s unit_sources (qualified name → project-relative paths) and their text from snapshots; each entry’s range is lowered against its own file and carries that file’s file:// URI, so click-to-code opens the right one. An entry whose file has no snapshot or no URI is dropped rather than sent with a wrong location. None for a suite, a file with no header, or a rel with no snapshot.