mirror of
https://github.com/LazyVim/starter.git
synced 2026-07-22 04:21:03 +00:00
Attempt to fix multi line jump
This commit is contained in:
parent
61ee194901
commit
cf731a7b8b
1 changed files with 9 additions and 51 deletions
|
|
@ -5,68 +5,26 @@ return {
|
|||
modes = {
|
||||
char = { enabled = false }, -- Disable `f` and `t` enhancements
|
||||
},
|
||||
label = {
|
||||
-- after = false,
|
||||
rainbow = {
|
||||
enabled = false,
|
||||
},
|
||||
format = function(opts)
|
||||
return { { opts.match.label, "FlashLabel" } } -- Replace the character with the label
|
||||
end,
|
||||
-- uppercase = false, -- Use lowercase labels
|
||||
-- rainbow = false, -- Disable rainbow colors
|
||||
-- format = function(opts)
|
||||
-- return { { opts.match.label, "FlashLabel" } } -- Replace the character with the label
|
||||
-- end,
|
||||
},
|
||||
search = {
|
||||
mode = "exact",
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
vim.api.nvim_set_hl(0, "FlashMatch", { fg = "NONE", bg = "NONE", bold = true })
|
||||
vim.api.nvim_set_hl(0, "FlashCurrent", { fg = "#ffffff", bg = "NONE", bold = true })
|
||||
vim.api.nvim_set_hl(0, "FlashLabel", { fg = "#ffcc00", bg = "NONE", bold = true })
|
||||
vim.api.nvim_set_hl(0, "FlashMatch", { fg = "#ff6600", bg = "NONE", bold = true })
|
||||
vim.api.nvim_set_hl(0, "FlashCurrent", { fg = "#ffffff", bg = "#ff0000", bold = true })
|
||||
end,
|
||||
keys = {
|
||||
-- <leader>f{char} to move to {char}
|
||||
{
|
||||
"<leader><leader>f",
|
||||
function()
|
||||
require("flash").jump({ search = { mode = "search" } })
|
||||
require("flash").jump({
|
||||
search = {
|
||||
forward = true,
|
||||
wrap = true,
|
||||
multi_window = false,
|
||||
},
|
||||
})
|
||||
end,
|
||||
mode = { "n", "x", "o" },
|
||||
desc = "Jump to character (EasyMotion)",
|
||||
},
|
||||
|
||||
-- s{char}{char} to move to {char}{char}
|
||||
{
|
||||
"<leader>sf",
|
||||
function()
|
||||
require("flash").jump({ pattern = ".", search = { mode = "search", multi_window = true } })
|
||||
end,
|
||||
mode = { "n", "x", "o" },
|
||||
desc = "Jump to character pair",
|
||||
},
|
||||
|
||||
-- Move to line
|
||||
{
|
||||
"<leader>L",
|
||||
function()
|
||||
require("flash").jump({ search = { mode = "lines", multi_window = true } })
|
||||
end,
|
||||
mode = { "n", "x", "o" },
|
||||
desc = "Jump to line",
|
||||
},
|
||||
|
||||
-- Move to word
|
||||
{
|
||||
"<leader>w",
|
||||
function()
|
||||
require("flash").jump({ search = { mode = "words", multi_window = true } })
|
||||
end,
|
||||
mode = { "n", "x", "o" },
|
||||
desc = "Jump to word",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue