From 58b470132119f01883ef68411adf62f65d91a0e9 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Fri, 6 Jun 2025 17:29:57 +0900 Subject: updates --- .../TheSiahxyz/lua/thesiahxyz/plugins/grug-far.lua | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/grug-far.lua (limited to 'ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/grug-far.lua') diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/grug-far.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/grug-far.lua new file mode 100644 index 0000000..6f6ff48 --- /dev/null +++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/grug-far.lua @@ -0,0 +1,31 @@ +return { + "MagicDuck/grug-far.nvim", + --- Ensure existing keymaps and opts remain unaffected + config = function(_, opts) + require("grug-far").setup(opts) + vim.api.nvim_create_autocmd("FileType", { + pattern = "grug-far", + callback = function() + -- Map to quit after ensuring we're in normal mode + vim.keymap.set({ "i", "n" }, "", "stopinsert | bd!", { buffer = true }) + end, + }) + end, + keys = { + { + "rp", + 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 = "Search and Replace", + }, + }, +} -- cgit v1.2.3