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 []
|
2022-06-13 19:58:46 +00:00
|
|
|
(let [find-opts (themes.get_ivy {:find_command [:fd
|
2022-04-05 19:57:44 +00:00
|
|
|
:--hidden
|
2022-06-12 21:06:29 +00:00
|
|
|
:--ignore-vcs
|
2022-04-05 19:57:44 +00:00
|
|
|
:-L
|
2022-06-13 19:58:46 +00:00
|
|
|
:--color
|
|
|
|
:never
|
|
|
|
:--exclude
|
|
|
|
:.git
|
|
|
|
:--exclude
|
|
|
|
:node_modules]})]
|
2022-06-12 21:06:29 +00:00
|
|
|
(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
|
|
|
|