Skip to main content

complete

Function complete 

Source
pub(super) fn complete(
    project_cache: Option<&ProjectCache>,
    types_lock: &Types,
    file_uri: &Url,
    root: &Path,
    prefix: &PrefixContext<'_>,
) -> Vec<CompletionItem>
Expand description

Run the 3-phase completion pipeline.

  1. Resolve context — determine default db/schema, file dependencies, and alias map from the file URI and project cache.
  2. Gather candidates — collect keywords, objects, and columns that match the prefix.
  3. Format items — convert candidates to LSP completion items.

When project_cache is None (no successful build yet), only keyword completions are returned. Keywords are included only when dots == 0 (the module decides this, not the caller).