From c23ce02bbd7368df2758cb45006a38450ca5d0b9 Mon Sep 17 00:00:00 2001 From: yetone Date: Wed, 4 Jun 2025 22:58:07 +0800 Subject: [PATCH] fix: add --no-ignore-parent option for rg (#2148) --- lua/avante/utils/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/avante/utils/init.lua b/lua/avante/utils/init.lua index f259463..30fc450 100644 --- a/lua/avante/utils/init.lua +++ b/lua/avante/utils/init.lua @@ -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