From 3af5e7b9af08c1609947556c95e7da8a7a0e23be Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Fri, 2 May 2025 19:52:53 +0300 Subject: Added grug-far instead of spectre for search and replace in nvim --- .config/nvim/lua/plugins/grug-far.lua | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .config/nvim/lua/plugins/grug-far.lua (limited to '.config/nvim/lua/plugins') diff --git a/.config/nvim/lua/plugins/grug-far.lua b/.config/nvim/lua/plugins/grug-far.lua new file mode 100644 index 0000000..ba78f17 --- /dev/null +++ b/.config/nvim/lua/plugins/grug-far.lua @@ -0,0 +1,26 @@ +return { + 'MagicDuck/grug-far.nvim', + event = 'VeryLazy', + cmd = 'GrugFar', + opts = { + headerMaxWidth = 80, + windowCreationCommand = 'botright split', + }, + keys = { + { + 'sr', + function() + local grug = require('grug-far') + local ext = vim.bo.buftype == '' and vim.fn.expand('%:e') + grug.open({ + transient = true, + prefills = { + filesFilter = ext and ext ~= '' and '*.' .. ext or nil, + }, + }) + end, + mode = { 'n', 'v' }, + desc = '[S]earch and [R]eplace', + }, + }, +} -- cgit v1.3.1