fdschmidt93 / telescope-egrepify.nvim

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

LOVE this extension, question about grep_string #9

Closed megalithic closed 1 year ago

megalithic commented 1 year ago

Is it possible to use this for grep_string instances/uses, not just for live_grep?

fdschmidt93 commented 1 year ago

Glad you like it!

I'm not sure I 100% follow. What from egrepify would you want for grep_string? I assume you refer to how results are presented. However, that does not work as rg groups matches by file which fzf-native does not do.

Plus, egrepify is practically the reason why I do not use grep_string.

Closing this for now as unplanned since I do not see an actionable item here.

E: I hate to be that guy, but please going forward consider specifying what you are actually requesting.

megalithic commented 1 year ago

@fdschmidt93

That is TOTALLY fair and understandable.

You're right, I didn't put any context around that at all.

You nailed it though, wanting the formatting of results and the filtering for moments where you might grep for visually selected text. I didn't see it in the docs, is there a way to start live_grep off with a starting string?

Forgive me if I'm not seeing where it might be, if possible. Thanks again!

fdschmidt93 commented 1 year ago

Any telescope picker takes a default_text argument with which a search string can be initialized.

Here's how I do it in my dotfiles for visual selection: https://github.com/fdschmidt93/dotfiles/blob/c4c2dc208e84164e50bece2d033e62468a20eb6f/nvim/.config/nvim/lua/fds/mappings.lua#L55-L71

megalithic commented 1 year ago

Thanks for your time, and for the code examples.