-
-
Notifications
You must be signed in to change notification settings - Fork 99
Live result preview in the interactive session #792
Description
I love using numbat as a fast, keyboard based calculator in the terminal.
For this, I use the interactive session.
To make this use case more comfortable, it would be great to have a live evaluation of the expression, as a preview, while typing.
I think it would be possible to implement this using an inline viewport from ratatui.
More concretely, my idea of the live preview would be to just show the same text or error as the interactive session would show after pressing ENTER.
Maybe a little mandatory delay between the last keystroke and the evaluation would be needed for the preview not being annoying. Otherwise, errors could be showing due to incomplete expressions whilst still typing.
Implementing this depends on #736, but as stated there, the Monaco Editor PR #741 already does some kind of live evaluation.
The goal would just be to bring this live evaluation into the interactive terminal session.