diff --git a/lua/avante/file_selector.lua b/lua/avante/file_selector.lua index 4af6ac6..ac4d278 100644 --- a/lua/avante/file_selector.lua +++ b/lua/avante/file_selector.lua @@ -58,6 +58,7 @@ end local function get_project_filepaths() local project_root = Utils.get_project_root() + print("project_root:", project_root) local files = Utils.scan_directory_respect_gitignore({ directory = project_root, add_dirs = true }) files = vim.iter(files):map(function(filepath) return Path:new(filepath):make_relative(project_root) end):totable() diff --git a/lua/avante/utils/root.lua b/lua/avante/utils/root.lua index 61aa057..e882567 100644 --- a/lua/avante/utils/root.lua +++ b/lua/avante/utils/root.lua @@ -140,7 +140,8 @@ function M.get(opts) ret = ret ~= "" and ret or vim.uv.cwd() print("Final Root:", ret) - return Utils.is_win() and ret:gsub("/", "\\") or ret + --- return Utils.is_win() and ret:gsub("/", "\\") or ret + return ret end function M.git()