From 585a48ff94d101478612e94754112bccb1d44e10 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 11 Dec 2025 20:24:38 +0100 Subject: [PATCH] nvim: Add mapping to flash.nvim current word Use 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 as is (somewhat) mimics the remote-based mappings for flash. --- nvim/.config/nvim/lua/modules/editing.lua | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/nvim/.config/nvim/lua/modules/editing.lua b/nvim/.config/nvim/lua/modules/editing.lua index e73c6ec..88d0fb7 100644 --- a/nvim/.config/nvim/lua/modules/editing.lua +++ b/nvim/.config/nvim/lua/modules/editing.lua @@ -24,11 +24,13 @@ return { }, { "S", - mode = { "n", "x", "o" }, + mode = { "n", "x" }, function() - require("flash").treesitter() + require("flash").jump({ + pattern = vim.fn.expand(""), + }) 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