diff --git a/lua/fzf-lua/providers/grep.lua b/lua/fzf-lua/providers/grep.lua index d8cc91f..fab9151 100644 --- a/lua/fzf-lua/providers/grep.lua +++ b/lua/fzf-lua/providers/grep.lua @@ -362,6 +362,11 @@ end M.grep_project = function(opts) if not opts then opts = {} end if not opts.search then opts.search = '' end + -- by default, do not include filename in search + if not opts.fzf_opts or opts.fzf_opts["--nth"] == nil then + opts.fzf_opts = opts.fzf_opts or {} + opts.fzf_opts["--nth"] = '2..' + end return M.grep(opts) end