feat(nvim): add a new binding for flash to search by the current word

This commit is contained in:
Sergio Laín 2024-03-13 10:17:24 +01:00
parent 4b0de73175
commit e47b17a38f
No known key found for this signature in database
GPG key ID: 14C9B8080681777B

View file

@ -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",
},
},
}