kkawakam / rustyline

Readline Implementation in Rust
https://crates.io/crates/rustyline/
MIT License
1.52k stars 175 forks source link

Fuzzy completion with nucleo? #723

Closed jaredramirez closed 9 months ago

jaredramirez commented 1 year ago

Rustyline currently uses skim to support fuzzy completion. This is really great, but unfortunately skim doesn't work on windows at the moment. (More details here: https://github.com/kkawakam/rustyline/pull/326).

There's a new implementation of a fuzzy finder in Rust, called nucleo written by the folks from helix. This implemention is really new, but when it becomes more stable, it'd could be worth using in rustyline instead of skim. The main advantages would be:

  1. Windows folks could get fuzzy completion
  2. Other folks that use rustyline who are concerned about 1 can get fuzzy completion

I'm a user of Nushell (which uses rustyline) and would love to get fuzzy completion there, but it's currently blocked by skim not supporting windows (https://github.com/nushell/nushell/issues/1275). So that's my motivation for this!

Due to nucleo's new-ness, there's no action to take right now, but I figured I'd open this ticket to put it on y'alls radar for whenever nucleo is stable!

gwenn commented 1 year ago

nushell uses reedline now (and not anymore rustyline). Currently with rustyline you cannot customize how candidates are retrieved / displayed / selected. If possible, I would prefer that rustyline exposes an API which let users implement their own completion interactive loop with nucleo or skim or ...