feat(fzf): Add ability to send additional flags to ripgrep

This commit is contained in:
Emmanuel Pilande 2024-07-05 15:50:12 -07:00
parent fb59a9feb0
commit 7d96157817

View file

@ -167,6 +167,15 @@ return {
},
},
grep = {
rg_glob = true,
-- first returned string is the new search query
-- second returned string are (optional) additional rg flags
-- @return string, string?
rg_glob_fn = function(query)
local regex, flags = query:match("^(.-)%s%-%-(.*)$")
-- If no separator is detected will return the original query
return (regex or query), flags
end,
actions = {
["alt-i"] = { actions.toggle_ignore },
["alt-h"] = { actions.toggle_hidden },