62 lines
2.0 KiB
Lua
62 lines
2.0 KiB
Lua
-- ============================================================================
|
|
-- FLASH: Fast navigation with search labels
|
|
-- ============================================================================
|
|
-- Enhanced motion plugin - type a few chars, then jump directly to any match
|
|
-- using labeled hints. Works across windows. Press 's' to start flash jump,
|
|
-- or use with 'f', 't' motions. Much faster than repeated w/b movements.
|
|
-- ============================================================================
|
|
return {
|
|
"folke/flash.nvim",
|
|
event = "VeryLazy",
|
|
opts = {
|
|
labels = "asdfghjklqwertyuiopzxcvbnm",
|
|
search = {
|
|
multi_window = true,
|
|
forward = true,
|
|
wrap = true,
|
|
},
|
|
jump = {
|
|
jumplist = true,
|
|
pos = "start",
|
|
history = false,
|
|
register = false,
|
|
nohlsearch = false,
|
|
autojump = false,
|
|
},
|
|
label = {
|
|
uppercase = false,
|
|
rainbow = {
|
|
enabled = true,
|
|
shade = 5,
|
|
},
|
|
},
|
|
modes = {
|
|
search = {
|
|
enabled = false, -- set to true to enable flash in search mode
|
|
},
|
|
char = {
|
|
enabled = true,
|
|
jump_labels = true,
|
|
multi_line = false,
|
|
},
|
|
treesitter = {
|
|
labels = "asdfghjklqwertyuiopzxcvbnm",
|
|
jump = { pos = "range" },
|
|
search = { incremental = false },
|
|
label = { before = true, after = true, style = "inline" },
|
|
highlight = {
|
|
backdrop = false,
|
|
matches = false,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
keys = {
|
|
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
|
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
|
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
|
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
|
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
|
},
|
|
}
|