blob: 5f3fac47f4f0632472233e9700caf8a46ea99520 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
-- from: https://github.com/nvim-telescope/telescope.nvim/wiki/Configuration-Recipes#falling-back-to-find_files-if-git_files-cant-find-a-git-directory
local M = {}
M.project_files = function()
local opts = { show_untracked = true }
local ok = pcall(require"telescope.builtin".git_files, opts)
if not ok then
require"telescope.builtin".find_files(opts)
end
end
return M
|