Expand description
Server-initiated window/showMessageRequest plumbing
(4.4.b; BC.8e reshape).
Spec (LSP §3.16): the server emits a message at a severity
level (Error / Warning / Info / Log) accompanied by a
list of MessageActionItem action labels. The client
displays a modal picker; the user selects one (or dismisses);
the client replies with the selected MessageActionItem, or
null if the user dismissed without choosing.
The user-side action set is server-defined – e.g.
rust-analyzer: [{ "title": "Reload Workspace" }] after a
Cargo.toml edit. Picker UI uses the existing modal picker
infrastructure (P.1+) but with a synthetic source built from
the action list.
BC.8e (2026-06-24): reshaped onto the generic inbound primitive
(host-drained variant). ShowMessageRequestBus is now a type alias for the
generic InboundBus built via
make_inbound_raw: its send
wakes the editor, so a server-initiated request raises the picker
off-keystroke (was: no wake — it only appeared on the next keypress). Like
apply-edit (BC.8d), this is the host-drained variant: the request is a
deferred user choice routed through the host picker primitive (the host
drain_inbound_show_message_requests registers the request — holding the
oneshot in lsp_pending_show_message_requests — opens the picker, and
resolves the oneshot from the accept / dismiss routing). That machinery is
irreducibly &mut Editor + the host picker, so the host keeps the receiver
(Editor::pending_show_message_request_rx) and the drain; the bus
contributes only the structural wake. No mode-owned handler, no Effect.
Structs§
- Inbound
Show Message Request - One server-initiated
window/showMessageRequestrequest, ferried from the LSP actor to the host’s drain. - Show
Message Request Outcome - Result the host reports back.
None= user dismissed.Some= user selected the carried action; the actor forwards this verbatim to the server.
Type Aliases§
- Show
Message Request Bus - The bus the supervisor fans out to each actor – the generic inbound
primitive specialised to the show-message-request payload, built
host-drained via
make_inbound_raw.sendwakes the editor; the host owns the matching receiver and drains it. (Was the bespokeShowMessageRequestBusstruct before BC.8e.)