Better defaults for vimgrep_arguments
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
- Maybe include something about vimgrep_arguments in the readme
- Maybe read the vimgrep_arguments passed to telescope and show a warning if they are set incorrectly
Awesome plugin! <3
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)
- You have
--fixed-strings, which causes issues with how AND operator works, correct? - You fixed this with
--trimwhich removes leading whitespaces --trimmight generally be a good addition
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 :)