Expand description
Built-in candidate generators (DESIGN.md §5.11.3).
v1 ships:
CommandsGenerator– everyCommandSpecin the registry. Caches the full set per registry-version (commands don’t change at runtime in v1, so the cache key is fixed and the cache effectively never expires).FilesGenerator– filesystem entries for a path-shaped prefix. Caches per-directory with a 1-second soft TTL.DirectoriesGenerator– likeFilesGeneratorbut only emits directory entries. Intended for:cdand similar directory-only commands.
Other host-state generators (chords, registers, marks, buffers)
live in lattice-ui-tui because they need App-level state.
Plugins register their own through the same trait.
Structs§
- Commands
Generator gen:commands. Walks theCommandRegistryand emits oneRawCandidateper registeredCommandSpec. Filtering is deferred to the matcher; the generator returns the full set every time the cache misses.- Directories
Generator gen:directories. Resolves the prefix into a directory + basename pattern, then lists only directories of that directory matching the basename prefix. LikeFilesGeneratorbut omits regular files.- Files
Generator gen:files. Resolves the prefix into a directory + basename pattern, then lists entries of that directory matching the basename prefix. Returns directories with a trailing/so the user can keep tab-completing into nested paths.
Functions§
- path_
entries - PC.9: [
fs_entries] without the completion engine’s context.