feat: grug-far.nvim

This commit is contained in:
punkfairie 2024-12-01 11:29:43 -08:00
parent bc8e2773c9
commit 5f9d587780
Signed by: punkfairie
GPG key ID: A509E8F77FB9D696
3 changed files with 27 additions and 0 deletions

View file

@ -51,6 +51,7 @@ with final.pkgs.lib; let
# Editor
neo-tree-nvim
grug-far-nvim
];
extraPackages = with pkgs; [

View file

@ -0,0 +1,25 @@
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,
}

View file

@ -1,5 +1,6 @@
local req = MarleyVim.local_require('plugins.editor')
return {
req('grug-far-nvim'),
req('neo-tree-nvim'),
}