Stream: ideas

Topic: Tab completion for roc repl


view this post on Zulip Andy Hamon (Jan 08 2024 at 20:16):

As I've been playing with roc, I really wish the repl had some sort of tab completion.

I've been poking around the repl source code, and it looks like roc uses rustyline which has completion support, so a lot of the plumbing is already there.

A good first pass I feel like would be basic completions for functions in the stdlib. I'm curious if there is any readily available way to enumerate all the builtin modules + their methods at runtime in rust.

view this post on Zulip Eli Dowling (Jan 08 2024 at 20:41):

We could potentially use some small portion of the language server to provide completions, load the repl content and then use the same code the language server uses for completions.

view this post on Zulip Folkert de Vries (Jan 08 2024 at 20:48):

probably we can make crates/compiler/module/src/symbol.rs do that (around line 800)


Last updated: Jun 16 2026 at 16:19 UTC