From 99a7ff44cdf70d028ef6aab26224f26f69ee528d Mon Sep 17 00:00:00 2001 From: aktersnurra Date: Thu, 16 Apr 2026 15:10:52 +0200 Subject: Add fff and other nice things such as macros --- fnl/plugins/fff.fnl | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 fnl/plugins/fff.fnl (limited to 'fnl/plugins/fff.fnl') diff --git a/fnl/plugins/fff.fnl b/fnl/plugins/fff.fnl new file mode 100644 index 0000000..3939408 --- /dev/null +++ b/fnl/plugins/fff.fnl @@ -0,0 +1,32 @@ +;; Freakin fast fuzzy file finder. + +(import-macros {: autocmd} :macros) + +(λ init [] + (autocmd :VimEnter + {:callback (λ [] + (when (= (. (vim.fn.argv) 1) nil) + (vim.schedule + (λ [] ((. (require :fff) :find_files)))))) + :once true})) + +(local opts {:layout {:height 0.8 + :width 0.7 + :prompt_position :bottom + :preview_position :top + :preview_size 0.8 + :flex {:size 130 :wrap :top} + :show_scrollbar false + :path_shorten_strategy :middle_number}}) + +{1 :dmtrKovalenko/fff.nvim + :build (λ [] + ((. (require :fff.download) :build_binary) + (λ [ok err] + (vim.schedule + (λ [] (vim.notify (if ok "fff.nvim built!" err))))))) + : opts + :lazy false + : init + :keys [{1 :mf 2 (λ [] ((. (require :fff) :find_files))) :desc "Find Files"} + {1 :mg 2 (λ [] ((. (require :fff) :live_grep))) :desc "Live Grep"}]} -- cgit v1.2.3-70-g09d2