Skip to content

Commit

Permalink
feat(nvim): grug-far replaces spectre
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikaverpil committed Jun 17, 2024
1 parent e9e19c3 commit ad92279
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions nvim-fredrik/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"friendly-snippets": { "branch": "main", "commit": "700c4a25caacbb4648c9a27972c2fe203948e0c2" },
"git-blame.nvim": { "branch": "master", "commit": "408d5487d908dfe5d48e5645d8b27ddcc16b11e0" },
"gitsigns.nvim": { "branch": "main", "commit": "47c8e3e571376b24de62408fd0c9d12f0a9fc0a3" },
"grug-far.nvim": { "branch": "main", "commit": "23a645089bd3fa75412babe9b9b3dc2b795f2e89" },
"gx.nvim": { "branch": "main", "commit": "cf6ed6ba86ffe4e3f51a898c03a05023b7a2fe48" },
"lazy.nvim": { "branch": "main", "commit": "4c6479e98ad643cd584e9e7c4095c463e0d810eb" },
"lazydev.nvim": { "branch": "main", "commit": "6184ebbbc8045d70077659b7d30c705a588dc62f" },
Expand Down
6 changes: 6 additions & 0 deletions nvim-fredrik/lua/config/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,12 @@ function M.setup_spectre_keymaps()
-- map_normal_mode("<leader>spw", ":lua require('spectre').open_visual({select_word=true})<CR>", "[s][p]ectre current [w]ord")
end

function M.setup_grug_far_keymaps()
return {
{ "<leader>sr", ":GrugFar<cr>", desc = "[s]earch and [r]eplace (grug-far)" },
}
end

function M.setup_noice_keymaps()
map_normal_mode("<leader>sna", ":Noice<CR>", "[s]earch [n]oice [a]ll")
map_normal_mode("<leader>snl", ":NoiceLast<CR>", "[s]earch [n]oice [l]ast")
Expand Down
10 changes: 10 additions & 0 deletions nvim-fredrik/lua/plugins/grug-far.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
return {
{
"MagicDuck/grug-far.nvim",
opts = {},
config = function(_, opts)
require("grug-far").setup(opts)
end,
keys = require("config.keymaps").setup_grug_far_keymaps(),
},
}
1 change: 1 addition & 0 deletions nvim-fredrik/lua/plugins/spectre.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ return {

{
"nvim-pack/nvim-spectre",
enabled = false, -- use grug-far instead
event = "VeryLazy",
dependencies = {
"nvim-lua/plenary.nvim",
Expand Down

0 comments on commit ad92279

Please sign in to comment.