folke / flash.nvim

Navigate your code with search labels, enhanced character motions and Treesitter integration
Apache License 2.0
2.47k stars 33 forks source link

bug: comma not working with f F t T motions #298

Closed SpacewaIker closed 2 months ago

SpacewaIker commented 9 months ago

Did you check docs and existing issues?

Neovim version (nvim -v)

NVIM v0.9.4

Operating system/version

Windows 11 23H2

Describe the bug

When using the f, F, t, T motions, I can use the semicolon to go to the next match, but the comma doesn't work. After moving around, the semicolon will also work to re-trigger the motion, but not the comma key. With the plugin disabled, the normal f F t T work with the comma as expected.

Steps To Reproduce

  1. Search for a character with f a
  2. Press ; to go to the next match
  3. Press ,, but nothing happens

Expected Behavior

The comma key should go to the previous match.

Repro

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  { "folke/flash.nvim", opts = {} },
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here
uduse commented 9 months ago

I had the same issue but I found out that it was caused by

vim.g.maplocalleader = ','

Removing this then , works again :)

SpacewaIker commented 9 months ago

I thought of this but temporarily setting my local leader to something else didn't work, and I couldn't find a line setting the local leader to ',' anywhere in my config...

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 2 months ago

This issue was closed because it has been stalled for 7 days with no activity.