nvim: Fix flash for search and operator pending

flash.nvim was activating on searches which, while perhaps useful
for some people, was not for me. It stops the (incremental) search
as soon as no valid target exists which drops you back into normal
mode while still typing out the search and thus doing
who-knows-what.

The operator pending mode for the original jump mapping has been
removed to allow the 'surround' mappings from mini plugin to
always work correctly (`ysiw`, `csaw`, ...).
This commit is contained in:
Marty Oehme 2024-06-06 09:58:25 +02:00
parent cb21789f3a
commit 434974284a
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -51,7 +51,7 @@ return {
keys = { keys = {
{ {
"s", "s",
mode = { "n", "x", "o" }, mode = { "n", "x" },
function() function()
require("flash").jump() require("flash").jump()
end, end,
@ -73,22 +73,6 @@ return {
end, end,
desc = "Remote Flash", desc = "Remote Flash",
}, },
{
"R",
mode = { "o", "x" },
function()
require("flash").treesitter_search()
end,
desc = "Treesitter Search",
},
{
"<c-s>",
mode = { "c" },
function()
require("flash").toggle()
end,
desc = "Toggle Flash Search",
},
}, },
}, },