2 ms·
> ropes in Rust won’t work well due to the lack of incremental search at this time Unless you don't mind implementing a couple dozen lines yourself. The regex_
by alpaca128 3y ago
> ropes in Rust won’t work well due to the lack of incremental search at this time
Unless you don't mind implementing a couple dozen lines yourself. The regex_automata crate allows you to directly access the DFA, so with iteration through the rope and a bit of state tracking you can already do this, just not as convenient (yet) as a single method call.
- celeritascelery 3y agoIt’s not quite that simple, but folks are working on it. https://github.com/rust-lang/regex/issues/425#issuecomment-1730365783 https://github.com/rust-lang/regex/issues/425#issuecomment-1... https://github.com/helix-editor/helix/pull/211#issuecomment-859583586 https://github.com/helix-editor/helix/pull/211#issuecomment-...
- alpaca128 3y agoMaybe not in the general case for arbitrary abstracted datastructures, but I have done it in a basic test to see if it's viable for my use-case, which is why I made that claim at all.
- burntsushi 3y agoNote that the lazy DFA and its lower level APIs exists now and threads this needle.