Improving the usability of the REPL is an important task.
IRB (interactive ruby) etc. have implemented a feature that completes REPL input in real time, and I think Erg can do the same thing.
Erg already has a Language Server, so the REPL can act like a language client. Alternatively, REPL can directly access the ELS API to obtain the input completion list without implementing LSP.
After that, I think we will need to implement a feature that monitors console input in real time and refreshes the screen every time the completion list is updated. I think it can be implemented using a TUI library (e.g. https://github.com/ratatui-org/ratatui) or it may be possible to implement it with crossterm, which is already a dependency of Erg.
Improving the usability of the REPL is an important task. IRB (interactive ruby) etc. have implemented a feature that completes REPL input in real time, and I think Erg can do the same thing.
Erg already has a Language Server, so the REPL can act like a language client. Alternatively, REPL can directly access the ELS API to obtain the input completion list without implementing LSP. After that, I think we will need to implement a feature that monitors console input in real time and refreshes the screen every time the completion list is updated. I think it can be implemented using a TUI library (e.g. https://github.com/ratatui-org/ratatui) or it may be possible to implement it with crossterm, which is already a dependency of Erg.