fdschmidt93 / telescope-egrepify.nvim

Variable user customization for telescope.live_grep to set rg flags on-the-fly
MIT License
115 stars 11 forks source link

Improve grep fuzzy_refine #17

Closed otavioschwanck closed 11 months ago

otavioschwanck commented 11 months ago

Is your feature request related to a problem? Please describe. On :Telescope livre_grep, after hitting you can search on the search results. On egrepify it is possible too. The difference is, when used on the egrepify, it only shows a lot of file title, without any matches.

Telescope live_grep: telescope live_grep

On Telescope egrepify with the same search: telescope egrepify

On egrepify, i can select the title, but not the content. The ideal here is: if the match is on title, show the matches too (but i think its too hard to implement).

Another solution could be just switch to live_grep when hitting ctrl+space (to not mess with the stuff)

If there is another way to search on the results, after i typed what i wanted, i am open to test it.

I use a lot this C-space, the projects that i work are massive.

obs: i could help to implement, but the plugin is too complex, if you want to me to take a look, send me where to look / change.

fdschmidt93 commented 11 months ago

On egrepify, i can select the title, but not the content. The ideal here is: if the match is on title, show the matches too (but i think its too hard to implement).

I don't fully follow what you are saying. But hovering the title and then showing other results is definitely out of the question (crazy complex and not in any way currently supported by telescope).

The title should probably be filtered on fuzzy refine. We should just implement that. Right now, clicking on title just opens the file, but that doesn't make sense.

The primary complexity comes from the fact that the entry maker should change, since the title is not inlined any longer vis-a-vis telescope.live_grep.

otavioschwanck commented 11 months ago

I don't fully follow what you are saying. But hovering the title and then showing other results is definitely out of the question (crazy complex and not in any way currently supported by telescope).

The idea of this issue is just to implement the to_fuzzy_refine in a way that work with egrepify structure:

  1. If i search a filename on the refine, should return all matches of the file or something like that
  2. if i search some text that is not a filename, should also return the file, now is not returning: image
  3. if the file doesn't have any match after fuzzy_refine, hide the title, or will be like that: image

the idea is make fuzzy_refine viable with egrepify

i know that point one and three probably is not possible to do, this is why i think that switching to the default live_grep could be an option (to_fuzzy_refine creates a new instance with the current results to common live_grep)