1
Fork 0
satellite/dotfiles/neovim/lua/my/plugins/flash.lua

37 lines
704 B
Lua
Raw Normal View History

2023-08-29 10:58:32 +02:00
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",
2023-08-29 14:24:30 +02:00
event = "VeryLazy",
2023-08-29 10:58:32 +02:00
---@type Flash.Config
2023-08-29 14:24:30 +02:00
opts = {
modes = {
char = {
enabled = false,
},
},
},
2023-08-29 10:58:32 +02:00
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