blob: fe245b99b44492002c24e4aad8af533a6664f2a6 (
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, use_git_root = false }
local ok = pcall(require"telescope.builtin".git_files, opts)
if not ok then
require"telescope.builtin".find_files(opts)
end
end
return M
|