25 lines
542 B
Lua
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,
|
|
}
|