Skip to main content

complete

Function complete 

Source
pub fn complete(
    source: &str,
    file: &ParsedFile,
    scopes: &[Scope],
    catalog: &Catalog,
    offset: TextSize,
) -> Vec<Item>
Expand description

Convenience wrapper for callers with no pre-computed buffer-derived catalog (tests, one-shot tools, dsl-cli). Derives it fresh from source via source_tables::from_source on every call. Callers that invoke completion repeatedly against the same buffer (an LSP server servicing one document across many requests) should derive this catalog once and call complete_with_derived directly instead – see Document::derived_catalog in dsl-server.