"Find in files" functionality #636
-
I've been playing around with helix for about a week now and think this is a great project! As is expected for a project so early in development, I'm noticing missing features that I reach for often in my current IDE of choice (IntelliJ). The big one that stands out is the ability to do recursive full-text search from the current directory. For posterity sake, I should first ask if this feature already exists and I just haven't been able to find it. If not... There are a couple ways to approach this feature, but one that I find compelling is to implement this feature using libripgrep, specifically these crates:
There's a writeup here detailing how leverage these crates to do such a thing. What's not clear to me is whether or not building this feature directly into helix aligns with its philosophy. Would it be more appropriate to shell out to an already existing tool (it looks like this is what kakoune does)? I do think there's a strong case for building this functionality directly into helix (would work out-of-the-box on Windows, can do more from a UX perspective, probably more performant) but would like to hear what other people think. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Note: This has been implemented as Previous discussion: This would be really useful, and I would say what kakoune does in this regard seems extreme from helix's point of view. Searching project wide is a pretty common use case, and I routinely use it with telescope in nvim. Paired with the builtin picker this could be a great addition. |
Beta Was this translation helpful? Give feedback.
-
I think this is a great idea also. I use this functionality in neovim the most other than finding files. Currently our picker is not streaming so it cannot do this. Some ways of implementing this are receiving items from a channel and having a sort phase and refresh phase. This way we can let items stream in but also refresh after sorting when more items come in and we haven't sorted them. This is how skim does it and probably fzf also. Another idea is to just repeatedly run grep on every keystroke which is what telscope live grep does and is easier to implement. Telscope also has a streaming version but it has no recalculation like skim or fzf, which makes it annoying to use because you have to wait until all the results are in. I prefer the former because the latter means fuzzy searching wouldn't make much sense. The second option to me is much more suited for things like workspace symbols in my opinion. |
Beta Was this translation helpful? Give feedback.
-
Isn't this already implemented as global search ( |
Beta Was this translation helpful? Give feedback.
Note: This has been implemented as
<space>
/
in #651.Previous discussion:
This would be really useful, and I would say what kakoune does in this regard seems extreme from helix's point of view. Searching project wide is a pretty common use case, and I routinely use it with telescope in nvim. Paired with the builtin picker this could be a great addition.