nvim: Add mapping to flash.nvim current word
Use <S> to jump to any word that is the same as the current word under the cursor using flash. Moved the previous flash treesitter binding and updated it to `treesitter_search` so any word in the current buffer view can be used as starting point for a tresitter-based selection. Mapping moved to <R> as is (somewhat) mimics the <yr...> remote-based mappings for flash.
This commit is contained in:
parent
ab3a104a85
commit
585a48ff94
1 changed files with 13 additions and 3 deletions
|
|
@ -24,11 +24,13 @@ return {
|
|||
},
|
||||
{
|
||||
"S",
|
||||
mode = { "n", "x", "o" },
|
||||
mode = { "n", "x" },
|
||||
function()
|
||||
require("flash").treesitter()
|
||||
require("flash").jump({
|
||||
pattern = vim.fn.expand("<cword>"),
|
||||
})
|
||||
end,
|
||||
desc = "Flash Treesitter",
|
||||
desc = "Flash",
|
||||
},
|
||||
{
|
||||
"r",
|
||||
|
|
@ -38,6 +40,14 @@ return {
|
|||
end,
|
||||
desc = "Remote Flash",
|
||||
},
|
||||
{
|
||||
"R",
|
||||
mode = { "n", "x", "o" },
|
||||
function()
|
||||
require("flash").treesitter_search()
|
||||
end,
|
||||
desc = "Flash Treesitter",
|
||||
},
|
||||
},
|
||||
},
|
||||
-- extend the ^x / ^a possibilities to dates, hex, alphabets, markdown headers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue