1
0
Fork 0
dotfiles/config/nvim/nifoc/telescope.fnl

24 lines
881 B
Text
Raw Normal View History

2022-04-05 19:57:44 +00:00
(let [mod {}
builtin (require :telescope.builtin)
themes (require :telescope.themes)]
2022-06-12 21:06:29 +00:00
(fn mod.find-files []
(let [find-opts (themes.get_ivy {:find_command [:rg
2022-04-05 19:57:44 +00:00
:--files
:--hidden
2022-06-12 21:06:29 +00:00
:--ignore-vcs
2022-04-05 19:57:44 +00:00
:-L
:-g
2022-05-01 19:52:10 +00:00
:!.git/*
:-g
2022-06-12 21:06:29 +00:00
:!node_modules/*]})]
(builtin.find_files find-opts)))
(fn mod.project-files []
(let [git-opts (themes.get_ivy)
2022-04-05 19:57:44 +00:00
ok? (pcall builtin.git_files git-opts)]
(when (not ok?)
2022-06-12 21:06:29 +00:00
(mod.find-files))))
2022-04-05 19:57:44 +00:00
mod)
2022-05-01 19:52:10 +00:00