Skip to content

Commit 9963a21

Browse files
committed
chore(keymap.editor): replace nvim-spectre with grug-far.nvim
1 parent 3a57d15 commit 9963a21

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lua/keymap/editor.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,27 +143,27 @@ local mappings = {
143143
-- see `:help MiniAI`
144144
-- see: https://youtu.be/6V8jdqdygB4
145145

146-
-- Plugin: nvim-spectre
146+
-- Plugin: grug-far
147147
["n|<leader>Ss"] = map_callback(function()
148-
require("spectre").toggle()
148+
require("grug-far").open()
149149
end)
150150
:with_silent()
151151
:with_noremap()
152152
:with_desc("editn: Toggle search & replace panel"),
153153
["n|<leader>Sp"] = map_callback(function()
154-
require("spectre").open_visual({ select_word = true })
154+
require("grug-far").open({ prefills = { search = vim.fn.expand("<cword>") } })
155155
end)
156156
:with_silent()
157157
:with_noremap()
158158
:with_desc("editn: search&replace current word (project)"),
159159
["v|<leader>Sp"] = map_callback(function()
160-
require("spectre").open_visual()
160+
require("grug-far").with_visual_selection()
161161
end)
162162
:with_silent()
163163
:with_noremap()
164164
:with_desc("edit: search & replace current word (project)"),
165165
["n|<leader>Sf"] = map_callback(function()
166-
require("spectre").open_file_search({ select_word = true })
166+
require("grug-far").open({ prefills = { paths = vim.fn.expand("%") } })
167167
end)
168168
:with_silent()
169169
:with_noremap()

0 commit comments

Comments
 (0)