Migrate from leap.nvim to flash.nvim
This commit is contained in:
parent
4e694ab3d7
commit
cb6ad4da32
3 changed files with 31 additions and 19 deletions
29
dotfiles/neovim/lua/my/plugins/flash.lua
Normal file
29
dotfiles/neovim/lua/my/plugins/flash.lua
Normal file
|
@ -0,0 +1,29 @@
|
|||
local function keybind(keys, action, desc, modes)
|
||||
if modes == nil then
|
||||
modes = { "n", "x", "o" }
|
||||
end
|
||||
|
||||
return {
|
||||
keys,
|
||||
mode = modes,
|
||||
function()
|
||||
require("flash")[action]()
|
||||
end,
|
||||
desc = desc,
|
||||
}
|
||||
end
|
||||
|
||||
local M = {
|
||||
"folke/flash.nvim",
|
||||
---@type Flash.Config
|
||||
opts = {},
|
||||
keys = {
|
||||
keybind("s", "jump", "Flash"),
|
||||
keybind("S", "treesitter", "Flash Treesitter"),
|
||||
keybind("r", "remote", "Remote Flash", { "o" }),
|
||||
keybind("R", "treesitter_search", "Treesitter Search", { "o", "x" }),
|
||||
keybind("<C-S>", "toggle", "Toggle Flash Search", { "c" }),
|
||||
},
|
||||
}
|
||||
|
||||
return M
|
|
@ -1,15 +0,0 @@
|
|||
local M = {
|
||||
-- removes the need for spamming w or e
|
||||
"ggandor/leap.nvim",
|
||||
name = "leap",
|
||||
event = "VeryLazy"
|
||||
}
|
||||
|
||||
function M.config()
|
||||
require("leap").add_default_mappings()
|
||||
end
|
||||
|
||||
-- (something)
|
||||
-- something
|
||||
|
||||
return M
|
Loading…
Add table
Add a link
Reference in a new issue