From 5a10209e89a5993ad66ae4335fc029068b2ad855 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Sun, 13 Apr 2025 22:40:13 +0200 Subject: Update --- fnl/plugins/grug-far.fnl | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'fnl/plugins/grug-far.fnl') diff --git a/fnl/plugins/grug-far.fnl b/fnl/plugins/grug-far.fnl index 44da9b1..fdcf897 100644 --- a/fnl/plugins/grug-far.fnl +++ b/fnl/plugins/grug-far.fnl @@ -11,12 +11,12 @@ (when ?cword (set opts.prefills.search ?cword)) (when ?file - (set opts.prefills.flags ?file)) - (grug.grug_far opts))) + (set opts.prefills.paths ?file)) + (grug.open opts))) (λ visual-replace [] (let [grug (require :grug-far)] - (grug.with_visual_selection {:prefills {:flags (vim.fn.expand "%")}}))) + (grug.with_visual_selection {:prefills {:paths (vim.fn.expand "%")}}))) (λ config [] (let [{: create-auto-cmds} (require :util.cmds) @@ -24,23 +24,23 @@ (create-auto-cmds auto-cmds) (grug.setup))) -(local keys [{1 : 2 :GrugFar :desc "Find and Replace"} - {1 : - 2 (λ [] - (replace (vim.fn.expand :))) - :desc "Find and replace word under cursor"} - {1 : +(local keys [{1 : 2 :GrugFar :desc "Find and Replace"} + {1 : 2 (λ [] (replace nil (vim.fn.expand "%"))) :desc "Find and replace in file"} - {1 : + {1 : 2 (λ [] - (replace (vim.fn.expand :) (vim.fn.expand "%"))) - :desc "Find and replace cword in file"} + (replace (vim.fn.expand :))) + :desc "Find and replace word under cursor"} {1 : 2 (λ [] (visual-replace)) :desc "Find and Replace" - :mode [:v]}]) + :mode [:v]} + {1 : + 2 (λ [] + (replace (vim.fn.expand :) (vim.fn.expand "%"))) + :desc "Find and replace cword in file"}]) {1 :MagicDuck/grug-far.nvim : keys : config} -- cgit v1.2.3-70-g09d2