fix: add --no-ignore-parent option for rg (#2148)

This commit is contained in:
yetone
2025-06-04 22:58:07 +08:00
committed by GitHub
parent 220594a66f
commit c23ce02bbd

View File

@@ -747,7 +747,7 @@ function M.scan_directory(options)
local cmd_supports_max_depth = true
local cmd = (function()
if vim.fn.executable("rg") == 1 then
local cmd = { "rg", "--files", "--color", "never", "--no-require-git" }
local cmd = { "rg", "--files", "--color", "never", "--no-require-git", "--no-ignore-parent" }
if options.max_depth ~= nil then vim.list_extend(cmd, { "--max-depth", options.max_depth }) end
table.insert(cmd, options.directory)
return cmd