Open haikyuu opened 1 year ago
I believe this issue is about searching the actual text in all the open buffers
Ahh sorry my bad, I might look into actually working on it then
That PR wraps the helix buffer datat structure (Rope
) so it can be effticely searched with grep_searcher
.
Based on that work it should be pretty easy to add a version that iterates all document instead of using a WalkBuilder
(and keep the logic inside the file iteration the same)
Should you need to type a search term first (similar to space-/
), or should it just open a picker right away (similar to space-f
, space-S`, etc.) filled with all lines?
I've been missing the latter, which I had in nvim from fzf.vim's :Lines
command.
you need to type the search regex first altough there are efforts to make the regex search incremental, see #4687.
Fuzzy matching on lines instead of performing a regex search could also be interesting but that would probably be a second picker closer to #3462. There are some strong performance caveats with that as it essentially requires loading all files into memory (and keeping them there). I have some ideas how to avoid the issue of cloning each line if the search was constrained to open buffers (or the current) tough. That is probably the more useful application too. However for a feature like that we would want the fuzzy matching to be partially async (so it runs synchronously when fast enough but asynchronously when not, maybe we can come-up with an even smarter strategy).
We currently have
/
for global search in workspace folder. But searching open buffers is sometimes useful. Maybe map it to[
(for open) to keep close to/
.