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

Searches for the string under your cursor or selection #33

Open kdurant opened 8 months ago

kdurant commented 8 months ago

Describe the solution you'd like Likes builtin.grep_string

fdschmidt93 commented 8 months ago

This will not be baked into egrepify since any picker supports passing default_text.

What I have in my configuration is to extract the visual selection. See here

https://github.com/fdschmidt93/dotfiles/blob/526fa21bace17a1121edaeb286847baccdaa3d6b/nvim/.config/nvim/lua/plugins/telescope/init.lua#L192-L211

This is a more general way to go about this. I'd be ok to have a PR that extracts my logic and sets default_text if a flag is set and user is in in visual mode.