Leap
info
You can enable the extra with the :LazyExtras
command.
Plugins marked as optional will only be configured if they are installed.
Below you can find a list of included plugins and their default settings.
caution
You don't need to copy the default settings to your config. They are only shown here for reference.
flit.nvim
easily jump to any location and enhanced f/t motions for Leap
- Options
- Full Spec
opts = { labeled_modes = "nx" }
{
"ggandor/flit.nvim",
enabled = true,
keys = function()
---@type LazyKeysSpec[]
local ret = {}
for _, key in ipairs({ "f", "F", "t", "T" }) do
ret[#ret + 1] = { key, mode = { "n", "x", "o" } }
end
return ret
end,
opts = { labeled_modes = "nx" },
}
leap.nvim
- Options
- Full Spec
opts = {}
{
"ggandor/leap.nvim",
enabled = true,
keys = {
{ "s", mode = { "n", "x", "o" }, desc = "Leap Forward to" },
{ "S", mode = { "n", "x", "o" }, desc = "Leap Backward to" },
{ "gs", mode = { "n", "x", "o" }, desc = "Leap from Windows" },
},
config = function(_, opts)
local leap = require("leap")
for k, v in pairs(opts) do
leap.opts[k] = v
end
leap.add_default_mappings(true)
vim.keymap.del({ "x", "o" }, "x")
vim.keymap.del({ "x", "o" }, "X")
end,
}
vim-repeat
makes some plugins dot-repeatable like leap
- Options
- Full Spec
opts = nil
{ "tpope/vim-repeat", event = "VeryLazy" }
mini.surround (optional)
rename surround mappings from gs to gz to prevent conflict with leap
- Options
- Full Spec
opts = {
mappings = {
add = "gza", -- Add surrounding in Normal and Visual modes
delete = "gzd", -- Delete surrounding
find = "gzf", -- Find surrounding (to the right)
find_left = "gzF", -- Find surrounding (to the left)
highlight = "gzh", -- Highlight surrounding
replace = "gzr", -- Replace surrounding
update_n_lines = "gzn", -- Update `n_lines`
},
}
{
"echasnovski/mini.surround",
optional = true,
opts = {
mappings = {
add = "gza", -- Add surrounding in Normal and Visual modes
delete = "gzd", -- Delete surrounding
find = "gzf", -- Find surrounding (to the right)
find_left = "gzF", -- Find surrounding (to the left)
highlight = "gzh", -- Highlight surrounding
replace = "gzr", -- Replace surrounding
update_n_lines = "gzn", -- Update `n_lines`
},
},
keys = {
{ "gz", "", desc = "+surround" },
},
}