marleyvim/nvim/lua/plugins/editor/grug-far-nvim.lua
2024-12-01 11:29:43 -08:00

25 lines
542 B
Lua

return {
'grug-far.nvim',
cmd = 'GrugFar',
keys = {
{
'<LEADER>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',
},
},
after = function()
require('grug-far').setup({ headerMaxWidth = 80 })
end,
}