1
0
Fork 0
dotfiles/home/config/nvim/nifoc/telescope.fnl
Daniel Kempkens 5acdfb9138
All checks were successful
Update Flake / update-flake (push) Successful in 3m45s
Build / build-amd64-linux (push) Successful in 1m16s
Build / build-arm64-linux (push) Successful in 5m28s
nvim: exclude direnv in telescope picker
2023-12-17 21:48:57 +01:00

27 lines
1.2 KiB
Fennel

(let [mod {}
builtin (require :telescope.builtin)
themes (require :telescope.themes)]
(fn mod.find-files []
(let [find-opts (themes.get_ivy {:find_command [:fd
:--type
:file
:--hidden
:--ignore-vcs
:-L
:--color
:never
:--exclude
:.git
:--exclude
:node_modules
:--exclude
:.direnv]})]
(builtin.find_files find-opts)))
(fn mod.project-files []
(let [git-opts (themes.get_ivy)
ok? (pcall builtin.git_files git-opts)]
(when (not ok?)
(mod.find-files))))
mod)