✨ feat(nvim): add a new binding for flash to search by the current word
This commit is contained in:
parent
4b0de73175
commit
e47b17a38f
1 changed files with 16 additions and 2 deletions
|
@ -1,12 +1,26 @@
|
||||||
return {
|
return {
|
||||||
"folke/flash.nvim",
|
"folke/flash.nvim",
|
||||||
keys = {
|
keys = {
|
||||||
-- stylua: ignore
|
|
||||||
{
|
{
|
||||||
"s",
|
"s",
|
||||||
mode = { "n", "x", "o" },
|
mode = { "n", "x", "o" },
|
||||||
function() require("flash").jump({ search = { mode = function(str) return "\\<" .. str end } }) end,
|
function()
|
||||||
|
require("flash").jump({
|
||||||
|
search = {
|
||||||
|
mode = function(str)
|
||||||
|
return "\\<" .. str
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
desc = "Flash",
|
desc = "Flash",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"<leader>*",
|
||||||
|
function()
|
||||||
|
require("flash").jump({ pattern = vim.fn.expand("<cword>") })
|
||||||
|
end,
|
||||||
|
desc = "Jump with current word",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue