smelt.files¶
Tier: Host - Available in every runtime, including headless mode.
Visibility: Public - Stable Lua API intended for user config and plugins.
Workspace file search. Owns background indexing, filesystem watching, and recent-selection ranking.
smelt.files.accept¶
Record a selected file result for recent-selection ranking. Options: { cwd? }. Returns (true, nil) or (false, err).
smelt.files.rescan¶
Trigger an asynchronous full rescan for the current workspace or opts.cwd. Returns (true, nil) or (false, err).
smelt.files.search¶
Search workspace files. Returns { items, total_matched, total_files, total_dirs, scanned, scanning, searching, ready, status, message, root }. Items are { label, path, insert_text, kind, score }. Options: { limit?, offset?, include_dirs?, cwd? }.
smelt.files.status¶
Return indexing status for the current workspace or opts.cwd: { root, initialized, files, scanned, scanning, watcher_ready, warmup_complete }.