return { "MagicDuck/grug-far.nvim", opts = { headerMaxWidth = 80, keymaps = { replace = { n = "r" }, qflist = { n = "q" }, syncLocations = { n = "s" }, syncLine = { n = "l" }, close = { n = "c" }, historyOpen = { n = "t" }, historyAdd = { n = "a" }, refresh = { n = "f" }, openLocation = { n = "o" }, openNextLocation = { n = "" }, openPrevLocation = { n = "" }, gotoLocation = { n = "" }, pickHistoryEntry = { n = "" }, abort = { n = "b" }, help = { n = "g?" }, toggleShowCommand = { n = "p" }, swapEngine = { n = "e" }, previewLocation = { n = "i" }, swapReplacementInterpreter = { n = "x" }, applyNext = { n = "j" }, applyPrev = { n = "k" }, }, }, cmd = "GrugFar", 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 = "Search and Replace", }, }, }