The first five start with reserved keywords and so surface as concrete literal candidates; COLUMN_DEF starts with COL_NAME (an Ident / NewName role) — a less concrete "type something" hint — so it ranks last in the displayed list.
Expected
A column name (the COLUMN_DEF first move) should be the prominent suggestion. Table-level constraints can still appear, but they shouldn't crowd out the most common next step. Possible fixes: reorder the choices, weight ident roles higher in hint rendering, or split into "column name (most common)" vs "or constraint:" groupings.
### Observed
After `create table Orders (`, the completion hints suggest:
`primary`, `unique`, `check`, `constraint`, `foreign`
…before any hint for a column name. The dominant case at this position is *"now type a column name"*; table-level constraints are the rarer follow-up.
### Why
`ELEMENT_CHOICES` in `src/dsl/grammar/sql_create_table.rs:391` lists the choices in this order:
```
TABLE_PK, TABLE_UNIQUE, TABLE_CHECK, TABLE_FK_NAMED, TABLE_FK, COLUMN_DEF
```
The first five start with reserved keywords and so surface as concrete literal candidates; `COLUMN_DEF` starts with `COL_NAME` (an `Ident` / `NewName` role) — a less concrete "type something" hint — so it ranks last in the displayed list.
### Expected
A column name (the `COLUMN_DEF` first move) should be the prominent suggestion. Table-level constraints can still appear, but they shouldn't crowd out the most common next step. Possible fixes: reorder the choices, weight ident roles higher in hint rendering, or split into "column name (most common)" vs "or constraint:" groupings.
Added a new HintMode::IntroProse(&'static str) variant that surfaces catalog prose at slot entry without suppressing Tab completion (unlike ProseOnly) and without requiring typing_name_at_cursor to fire (unlike ForceProse). Wrapped ELEMENT in Node::Hinted { mode: IntroProse("hint.create_table_element"), … }.
At create table T ( the ambient hint now reads: "Type a column name, or a table-level constraint: primary, unique, check, constraint, foreign" — column name is the dominant first move; the constraint alternatives are folded into the prose. Tab still cycles every keyword.
The new variant is an additive extension to the ADR-0024 HintMode-per-node model; no behaviour change to existing modes.
Resolved in commit 6f87ad1.
Added a new `HintMode::IntroProse(&'static str)` variant that surfaces catalog prose at slot entry without suppressing Tab completion (unlike `ProseOnly`) and without requiring `typing_name_at_cursor` to fire (unlike `ForceProse`). Wrapped ELEMENT in `Node::Hinted { mode: IntroProse("hint.create_table_element"), … }`.
At `create table T (` the ambient hint now reads: *"Type a column name, or a table-level constraint: `primary`, `unique`, `check`, `constraint`, `foreign`"* — column name is the dominant first move; the constraint alternatives are folded into the prose. Tab still cycles every keyword.
The new variant is an additive extension to the ADR-0024 HintMode-per-node model; no behaviour change to existing modes.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Observed
After
create table Orders (, the completion hints suggest:primary,unique,check,constraint,foreign…before any hint for a column name. The dominant case at this position is "now type a column name"; table-level constraints are the rarer follow-up.
Why
ELEMENT_CHOICESinsrc/dsl/grammar/sql_create_table.rs:391lists the choices in this order:The first five start with reserved keywords and so surface as concrete literal candidates;
COLUMN_DEFstarts withCOL_NAME(anIdent/NewNamerole) — a less concrete "type something" hint — so it ranks last in the displayed list.Expected
A column name (the
COLUMN_DEFfirst move) should be the prominent suggestion. Table-level constraints can still appear, but they shouldn't crowd out the most common next step. Possible fixes: reorder the choices, weight ident roles higher in hint rendering, or split into "column name (most common)" vs "or constraint:" groupings.Resolved in commit
6f87ad1.Added a new
HintMode::IntroProse(&'static str)variant that surfaces catalog prose at slot entry without suppressing Tab completion (unlikeProseOnly) and without requiringtyping_name_at_cursorto fire (unlikeForceProse). Wrapped ELEMENT inNode::Hinted { mode: IntroProse("hint.create_table_element"), … }.At
create table T (the ambient hint now reads: "Type a column name, or a table-level constraint:primary,unique,check,constraint,foreign" — column name is the dominant first move; the constraint alternatives are folded into the prose. Tab still cycles every keyword.The new variant is an additive extension to the ADR-0024 HintMode-per-node model; no behaviour change to existing modes.