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 +++++++++++++------------- fnl/plugins/surround.fnl | 18 +++++++++++++++++- fnl/plugins/zen.fnl | 4 ++-- 3 files changed, 32 insertions(+), 16 deletions(-) (limited to '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} diff --git a/fnl/plugins/surround.fnl b/fnl/plugins/surround.fnl index e8fda32..2942bdb 100644 --- a/fnl/plugins/surround.fnl +++ b/fnl/plugins/surround.fnl @@ -1,3 +1,19 @@ ;; Surround selections. -{1 :kylechui/nvim-surround :event :InsertEnter :config true} +(local keymaps {:insert :s + :insert_line :S + :normal :ys + :normal_cur :yss + :normal_line :yS + :normal_cur_line :ySS + :visual :gS + :visual_line :gS + :delete :ds + :change :cs + :change_line :cS}) + +(λ config [] + (let [surround (require :nvim-surround)] + (surround.setup {: keymaps}))) + +{1 :kylechui/nvim-surround :event :VeryLazy : config} diff --git a/fnl/plugins/zen.fnl b/fnl/plugins/zen.fnl index fcaf114..caa7313 100644 --- a/fnl/plugins/zen.fnl +++ b/fnl/plugins/zen.fnl @@ -1,8 +1,8 @@ ;; Zen mode. -(local opts {:window {:backdrop 1 +(local opts {:window {:backdrop 0.98 :height 1 - :width 128 + :width 120 :options {:signcolumn :no :number false :relativenumber false}} -- cgit v1.2.3-70-g09d2