Skip to main content

Module registry

Module registry 

Source
Expand description

Where pluggable completion stages register themselves.

Mirrors the shape of [lattice_grammar::CommandRegistry]: each kind of registrant gets a register_* method (#[track_caller] so source provenance is captured for :describe-completion-source) and an internal pub(crate) insert_* that the host or trusted subsystems can use with an explicit source.

Generators / matchers / rankers / annotators are all looked up by typed id newtype. The host configures one default matcher, one default ranker, and an ordered list of default annotators; per-slot pipelines clone these from the registry at query time.

Structsยง

AnnotatorId
CompletionRegistry
GeneratorId
Strongly-typed handle to a registered completion generator.
MatcherId
RankerId
RegisteredAnnotator
RegisteredGenerator
Metadata + impl for a registered generator. The inner is held behind Arc<dyn ...> so the pipeline can clone the handle without taking ownership.
RegisteredMatcher
RegisteredRanker