1
0
Fork 0
dotfiles/config/nvim/lua/nifoc/utils/telescope.lua

19 lines
436 B
Lua
Raw Normal View History

2021-12-06 22:35:29 +00:00
local telescope_themes = require('telescope.themes')
local M = {}
M.project_files = function()
local git_opts = telescope_themes.get_ivy()
local ok = pcall(require'telescope.builtin'.git_files, git_opts)
if not ok then
local find_opts = telescope_themes.get_ivy({
find_command = { 'rg', '--files', '--hidden', '-L', '-g', '!.git/*' }
})
require('telescope.builtin').find_files(find_opts)
end
end
return M