diff options
| author | Kyren223 <Kyren223@proton.me> | 2025-05-02 19:52:53 +0300 |
|---|---|---|
| committer | Kyren223 <Kyren223@proton.me> | 2025-05-02 19:52:53 +0300 |
| commit | 3af5e7b9af08c1609947556c95e7da8a7a0e23be (patch) | |
| tree | 5f6c4cc3822eaa43f4003be369d7a33ce4d1336b /.config/nvim/lua/plugins | |
| parent | 0712e89f57ae108db0ff40892d6124814c874f37 (diff) | |
Added grug-far instead of spectre for search and replace in nvim
Diffstat (limited to '.config/nvim/lua/plugins')
| -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', + }, + }, +} |
