fdschmidt93 / telescope-egrepify.nvim

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

Better defaults for vimgrep_arguments #35

Open dlvhdr opened 10 months ago

dlvhdr commented 10 months ago

I had the --fixed-strings option set under telescope's defaults.vimgrep_arguments and couldn't figure out why egrepify wasn't working correctly with the AND operator. Fixed it by running it with:

        require("telescope").extensions.egrepify.egrepify({
          vimgrep_arguments = {
            "rg",
            "--color=never",
            "--no-heading",
            "--with-filename",
            "--line-number",
            "--column",
            "--smart-case",
            "--hidden",
            "--trim", -- add this value
          },
        })

Suggestions

Awesome plugin! <3

fdschmidt93 commented 8 months ago

Awesome plugin! <3

Glad you like it!

I had the --fixed-strings option set under telescope's defaults.vimgrep_arguments and couldn't figure out why egrepify wasn't working correctly with the AND operator. Fixed it by running it with:

Let me decompose your issue a bit so I get this right (for, apologies, laziness to go and test all of this myself)

Maybe read the vimgrep_arguments passed to telescope and show a warning if they are set incorrectly

Not sure I follow. The vimgrep arguments from telescope should already be inherited? And setting it in the egrepify config hopefully correctly overrides that? That is, you can maintain vimgrep config for both telescope and egrepify, respectively, if you wanted to.

Maybe include something about vimgrep_arguments in the readme

Happy to have more documentation. PR welcome :)