feat(nvim): add a new binding for flash to search by the current word
This commit is contained in:
1 parent
ffe35ac331
commit
18ad3e93e3
1 file changed
+16
-2
@@ -1,12 +1,26 @@
|
||||
return {
|
||||
"folke/flash.nvim",
|
||||
keys = {
|
||||
-- stylua: ignore
|
||||
{
|
||||
"s",
|
||||
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",
|
||||
},
|
||||
{
|
||||
"<leader>*",
|
||||
function()
|
||||
require("flash").jump({ pattern = vim.fn.expand("<cword>") })
|
||||
end,
|
||||
desc = "Jump with current word",
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in new issue
Block a user