pub fn completion(source: &str, offset: usize) -> Vec<CompletionItem>Expand description
Returns completions appropriate at offset (byte offset) in source.
Uses the parsed AST to determine context:
- Outside all declarations -> top-level keywords.
- Inside a
datasourceorgeneratorblock -> config key suggestions. - Inside a
modelblock:- After
@-> field attribute names. - After
@@-> model attribute names. - Otherwise -> scalar types, user-defined model/enum names, and common field attributes as a convenience.
- After