feat(editor): replace nvim-spectre with grug-far.nvim

This commit is contained in:
Folke Lemaitre 2024-07-18 11:09:30 +02:00
parent eed91a3e4c
commit 90a3afac38
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -128,13 +128,22 @@ return {
-- search/replace in multiple files
{
"nvim-pack/nvim-spectre",
build = false,
cmd = "Spectre",
opts = { open_cmd = "noswapfile vnew" },
-- stylua: ignore
"MagicDuck/grug-far.nvim",
opts = { headerMaxWidth = 80 },
cmd = "GrugFar",
keys = {
{ "<leader>sr", function() require("spectre").open() end, desc = "Replace in Files (Spectre)" },
{
"<leader>sr",
function()
require("grug-far").grug_far({
prefills = {
search = vim.fn.expand("<cword>"),
filesFilter = "*." .. vim.fn.expand("%:e"),
},
})
end,
desc = "Search and Replace",
},
},
},