diff options
Diffstat (limited to '.config/nvim/lua/plugins/grug-far.lua')
| -rw-r--r-- | .config/nvim/lua/plugins/grug-far.lua | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/.config/nvim/lua/plugins/grug-far.lua b/.config/nvim/lua/plugins/grug-far.lua new file mode 100644 index 0000000..ba78f17 --- /dev/null +++ b/.config/nvim/lua/plugins/grug-far.lua @@ -0,0 +1,26 @@ +return { + 'MagicDuck/grug-far.nvim', + event = 'VeryLazy', + cmd = 'GrugFar', + opts = { + headerMaxWidth = 80, + windowCreationCommand = 'botright split', + }, + 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 = '[S]earch and [R]eplace', + }, + }, +} |
