feat: grug-far.nvim
This commit is contained in:
parent
bc8e2773c9
commit
5f9d587780
3 changed files with 27 additions and 0 deletions
|
@ -51,6 +51,7 @@ with final.pkgs.lib; let
|
|||
|
||||
# Editor
|
||||
neo-tree-nvim
|
||||
grug-far-nvim
|
||||
];
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
|
|
25
nvim/lua/plugins/editor/grug-far-nvim.lua
Normal file
25
nvim/lua/plugins/editor/grug-far-nvim.lua
Normal 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,
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
local req = MarleyVim.local_require('plugins.editor')
|
||||
|
||||
return {
|
||||
req('grug-far-nvim'),
|
||||
req('neo-tree-nvim'),
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue