mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-26 10:48:45 +02:00
feat(leap): lazy-load leap/flit and added keymaps
This commit is contained in:
parent
e33dd761b1
commit
eccd122e6d
1 changed files with 17 additions and 2 deletions
|
@ -151,10 +151,25 @@ return {
|
||||||
},
|
},
|
||||||
|
|
||||||
-- easily jump to any location and enhanced f/t motions for Leap
|
-- easily jump to any location and enhanced f/t motions for Leap
|
||||||
|
{
|
||||||
|
"ggandor/flit.nvim",
|
||||||
|
keys = function()
|
||||||
|
---@type LazyKeys[]
|
||||||
|
local ret = {}
|
||||||
|
for _, key in ipairs({ "f", "F", "t", "T" }) do
|
||||||
|
ret[#ret + 1] = { key, mode = { "n", "x", "o" }, desc = key }
|
||||||
|
end
|
||||||
|
return ret
|
||||||
|
end,
|
||||||
|
opts = { labeled_modes = "nx" },
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"ggandor/leap.nvim",
|
"ggandor/leap.nvim",
|
||||||
event = "VeryLazy",
|
keys = {
|
||||||
dependencies = { { "ggandor/flit.nvim", opts = { labeled_modes = "nv" } } },
|
{ "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)
|
config = function(_, opts)
|
||||||
local leap = require("leap")
|
local leap = require("leap")
|
||||||
for k, v in pairs(opts) do
|
for k, v in pairs(opts) do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue