Skip to main content

make_handler

Function make_handler 

Source
pub fn make_handler(
    config_tree: Arc<ArcSwap<Table>>,
) -> impl FnMut(InboundConfigurationRequest) -> Vec<Effect> + Send + 'static
Expand description

BC.8b: the mode-owned handler for server-initiated workspace/configuration, registered via boot.inbound::<…>().

For each request it reads every requested section from the shared lsp.* config tree (the same merged user+project tree the host edits on reload) and resolves the request’s oneshot with one serde_json::Value per section, in input order. A dropped receiver (server gone) is fine — log-and-skip. It is a pure read, so it emits no [Effect]: the Vec<Effect> it returns is always empty.

config_tree is shared (Arc<ArcSwap<…>>) so the handler always reads the current config — the host re-stores it on :set / config reload.