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/grug-far.fnl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'fnl/plugins/grug-far.fnl') diff --git a/fnl/plugins/grug-far.fnl b/fnl/plugins/grug-far.fnl index fdcf897..ebd1835 100644 --- a/fnl/plugins/grug-far.fnl +++ b/fnl/plugins/grug-far.fnl @@ -1,9 +1,6 @@ ;; Find and replace plugin. -(local auto-cmds - [[:FileType - {:pattern [:grug-far] - :command "nnoremap q :close"}] - [:FileType {:pattern [:grug-far] :command "setlocal spell!"}]]) + +(import-macros {: autocmds} :macros) (λ replace [?cword ?file] (let [grug (require :grug-far)] @@ -19,9 +16,12 @@ (grug.with_visual_selection {:prefills {:paths (vim.fn.expand "%")}}))) (λ config [] - (let [{: create-auto-cmds} (require :util.cmds) - grug (require :grug-far)] - (create-auto-cmds auto-cmds) + (let [grug (require :grug-far)] + (autocmds + [:FileType + {:pattern [:grug-far] + :command "nnoremap q :close"}] + [:FileType {:pattern [:grug-far] :command "setlocal spell!"}]) (grug.setup))) (local keys [{1 : 2 :GrugFar :desc "Find and Replace"} -- cgit v1.2.3-70-g09d2