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

28 lines
1.2 KiB
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 []
2022-06-13 19:58:46 +00:00
(let [find-opts (themes.get_ivy {:find_command [:fd
:--type
:file
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
:--exclude
:.direnv]})]
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)