dotfiles/.config/nvim/lua/telescope-config.lua

14 lines
357 B
Lua
Raw Normal View History

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
require"telescope.builtin".git_files({git_command={"git","ls-files","--exclude-standard","--cached","--other"}})
else
require"telescope.builtin".find_files(opts)
end
end
return M