Expand description
Detect what kinds of completion items make sense at the cursor.
Token-only classifier: reads the text to the left of the cursor and recognises the high-value cases. Doesn’t depend on the parser succeeding so we keep working on half-written SQL.
| Cursor position | Context |
|---|---|
<alias>.<partial> | DotOf |
| after FROM / JOIN / INTO / UPDATE / ALTER TABLE | Table |
| after ON / WHERE / HAVING / AND / OR | Predicate (columns + funcs + keywords) |
| start of statement | Statement (keywords-focused) |
| inside SELECT list (after SELECT, before FROM) | Projection (columns of FROM + funcs) |
| anywhere else | General (everything merged) |