Files
Darren Schroeder 7219843497 A status line under the prompt: errors, signatures, types and const previews as you type (#19403)
## Description

The highlighter already parses the line on every keystroke, then keeps
only the colors. This PR uses that parse to draw one line under the
buffer. The line shows the first parse or type error, or, when there is
none, the signature of the command under the cursor with the current
parameter emphasized, the type the pipeline outputs, and the value of a
line built only from const commands.

An error appears as soon as it stops being about the text still being
typed: `let x: int = "a"` shows nothing until a space follows the `"a"`,
and `str substring ` waits for its range. Nothing shows while the
validator calls the line unfinished, as with an open `{`, and no error
or preview shows for a line that `use`s a module not loaded yet: the
highlighter's parse skips loading it, so its names would read as
unknown.



https://github.com/user-attachments/assets/d7e467f0-fdeb-42b4-a93e-20c49f56c9e0



## User-facing changes (Release notes)

- The REPL shows a status line under the line being edited: the first
parse or type error, or the signature of the command under the cursor,
the type the pipeline outputs, and the value of a line built only from
const commands (`"a,b" | split row ","` shows `= [a, b]`). It is erased
when the line runs.
- `$env.config.status_line` controls it: `enable` turns all of it off,
and `errors`, `signature`, `type` and `preview` turn off one part each.
- Ctrl+C now stops a math reduction over a big range, such as
`1..10000000000 | math sum`, with `Operation interrupted`. In a script
or `nu -c`, it also stops a const evaluation such as `const x =
(1..10000000000 | math sum)`.

## Additional notes
2026-11-02 06:34:28 -06:00
..