update:grug settings
This commit is contained in:
@@ -10,6 +10,8 @@ local function with_trouble(fn)
|
|||||||
fn()
|
fn()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- grug guide
|
||||||
|
-- navigate splits: <C+w><Left> or <Right>
|
||||||
local function with_grug(fn)
|
local function with_grug(fn)
|
||||||
lazy.load_once("grug-far", pack.registry({ "grug-far.nvim" }), function()
|
lazy.load_once("grug-far", pack.registry({ "grug-far.nvim" }), function()
|
||||||
require("grug-far").setup({})
|
require("grug-far").setup({})
|
||||||
@@ -48,9 +50,9 @@ function M.setup()
|
|||||||
end)
|
end)
|
||||||
end, { desc = "Search/replace current file" })
|
end, { desc = "Search/replace current file" })
|
||||||
|
|
||||||
vim.keymap.set("v", "<leader>s", function()
|
vim.keymap.set("x", "<leader>s", function()
|
||||||
with_grug(function()
|
with_grug(function(grug)
|
||||||
vim.cmd("'<,'>GrugFarWithin")
|
grug.open({ visualSelectionUsage = "operate-within-range" })
|
||||||
end)
|
end)
|
||||||
end, { desc = "Search/replace in selection" })
|
end, { desc = "Search/replace in selection" })
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
|
vim.g.maplocalleader = " "
|
||||||
|
|
||||||
vim.opt.timeoutlen = 350
|
vim.opt.timeoutlen = 350
|
||||||
vim.opt.updatetime = 50
|
vim.opt.updatetime = 50
|
||||||
|
|||||||
Reference in New Issue
Block a user