2023-01-03 14:59:56 +00:00
|
|
|
local M = {}
|
|
|
|
|
|
|
|
M.project_files = function()
|
|
|
|
local opts = {}
|
|
|
|
vim.fn.system('git rev-parse is-inside-work-tree')
|
|
|
|
if vim.v.shell_error == 0 then
|
2023-04-07 16:24:48 +00:00
|
|
|
require("telescope.builtin").git_files({show_untracked=true})
|
2023-01-03 14:59:56 +00:00
|
|
|
else
|
2023-04-07 16:24:48 +00:00
|
|
|
require("telescope.builtin").find_files(opts)
|
2023-01-03 14:59:56 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
return M
|