require("utility.misc") function RepositoryRoot() local current_file = GetCurrentFile() if current_file == "fzf" then return "" end local super_project_path = vim.fn.system("git -C " .. Dirname(current_file) .. " rev-parse --show-superproject-working-tree") if vim.v.shell_error ~= 0 then return "" end if super_project_path then return super_project_path end local toplevel_path = vim.fn.system("git -C " .. Dirname(current_file) .. " rev-parse --show-toplevel | tr -d '\n'") if vim.v.shell_error ~= 0 then return "" end return toplevel_path end