Compare commits

...

5 Commits

Author SHA1 Message Date
Folke Lemaitre b35442dfe7 docs: added grug-far to news 2024-07-20 20:41:39 +02:00
Folke Lemaitre d58e4c4f89 perf: disable mini.anitmate in grug-far buffers 2024-07-20 17:41:59 +02:00
Folke Lemaitre 5adec47431 feat: use selection when in visual mode 2024-07-20 17:41:59 +02:00
Folke Lemaitre 68cf175176 feat: added grug-far to close with q 2024-07-20 17:41:59 +02:00
Folke Lemaitre 90a3afac38 feat(editor): replace nvim-spectre with grug-far.nvim 2024-07-20 17:41:58 +02:00
4 changed files with 29 additions and 6 deletions
+3
View File
@@ -2,6 +2,9 @@
## 12.x
- [nvim-spectre](https://github.com/nvim-pack/nvim-spectre) has been removed in favor of [grug-far.nvim](https://github.com/MagicDuck/grug-far.nvim).
**grug-far.nvim** has a great UI and feels more intuitive to use.
- This **news** is now also available on the website at [https://www.lazyvim.org/news](https://www.lazyvim.org/news)
- **prettier** extra now works for all prettier supported filetypes
+1
View File
@@ -55,6 +55,7 @@ vim.api.nvim_create_autocmd("FileType", {
group = augroup("close_with_q"),
pattern = {
"PlenaryTestPopup",
"grug-far",
"help",
"lspinfo",
"notify",
+18 -6
View File
@@ -128,13 +128,25 @@ 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()
local is_visual = vim.fn.mode():lower():find("v")
if is_visual then -- needed to make visual selection work
vim.cmd([[normal! v]])
end
local grug = require("grug-far");
(is_visual and grug.with_visual_selection or grug.grug_far)({
prefills = { filesFilter = "*." .. vim.fn.expand("%:e") },
})
end,
mode = { "n", "v" },
desc = "Search and Replace",
},
},
},
@@ -14,6 +14,13 @@ return {
end, { expr = true })
end
vim.api.nvim_create_autocmd("FileType", {
pattern = "grug-far",
callback = function()
vim.b.minianimate_disable = true
end,
})
LazyVim.toggle.map("<leader>ua", {
name = "Mini Animate",
get = function()