From a31c84f9d7f4544446b02e8666a85a80478b8da0 Mon Sep 17 00:00:00 2001 From: kokopi-dev Date: Mon, 13 Apr 2026 21:43:56 +0900 Subject: [PATCH] add:find files fallback --- nvim/lua/plugins/telescope.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nvim/lua/plugins/telescope.lua b/nvim/lua/plugins/telescope.lua index 5b78707..fb896e9 100644 --- a/nvim/lua/plugins/telescope.lua +++ b/nvim/lua/plugins/telescope.lua @@ -61,10 +61,11 @@ function M.setup_keymaps() vim.keymap.set("n", "", function() with_telescope(function(builtin) if not pcall(builtin.git_files, { show_untracked = true }) then - vim.notify("Not a git project. Try running git init in root.", vim.log.levels.WARN) + vim.notify("No git repo detected. Falling back to find_files in current cwd.", vim.log.levels.INFO) + builtin.find_files({ cwd = vim.fn.getcwd() }) end end) - end, { desc = "Git files" }) + end, { desc = "Git files (fallback to cwd files)" }) end return M