Skip to main content

Module completion_source

Module completion_source 

Source
Expand description

PH7.6 — the WasmCompletionSource adapter (the async-produce path).

Wraps a completion plugin’s CompletionClient bridge. Unlike the picker adapter, this is NOT an Arc<dyn CandidateGenerator> inserted into the synchronous completion pipeline — a WASM generate is async + actor-bound, and matching/annotation run per candidate on the keystroke path (paramount #1). Instead, following the LSP-completion precedent (pipeline.rs match_and_rank “pre-supplies rows from async LSP responses”), this adapter produces candidates asynchronously; the host then runs the NATIVE match_and_rank over them (matching / ranking / annotation stay native). Option A, locked with Dhruva — see wit/completion-source.wit.

Structs§

WasmCompletionSource
An async completion producer over a plugin’s CompletionClient. Cheap to clone (the client is an mpsc Sender clone + cached id/doc); every clone talks to the same actor.