Closed ranebrown closed 1 year ago
v0.10.0-dev-617+g2d40f5e84
macOS 13.4.1
The TextYankPost autocommand calling vim.highlight.on_yank({ higroup = "Visual", on_visual = false }) does not seem to be triggered when using flash.
TextYankPost
vim.highlight.on_yank({ higroup = "Visual", on_visual = false })
yt<char>
yy
Text is highlighted on yank.
-- 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 = { modes = { char = { jump_labels = true, config = function(opts) local op_pend = vim.fn.mode(true):find("no") local skip_op = vim.v.operator == "y" or vim.v.operator == "d" local should_hide = op_pend and skip_op opts.autohide = should_hide opts.jump_labels = opts.jump_labels and vim.v.count == 0 and not should_hide end, highlight = { backdrop = false }, }, }, }, }, -- add any other plugins here } require("lazy").setup(plugins, { root = root .. "/plugins", }) vim.cmd.colorscheme("tokyonight") -- add anything else here vim.api.nvim_create_autocmd({ "TextYankPost" }, { pattern = { "*" }, callback = function() vim.highlight.on_yank({ higroup = "Visual", on_visual = false }) end, })
That's because you set yank highlights for visual to false
false
Did you check docs and existing issues?
Neovim version (nvim -v)
v0.10.0-dev-617+g2d40f5e84
Operating system/version
macOS 13.4.1
Describe the bug
The
TextYankPost
autocommand callingvim.highlight.on_yank({ higroup = "Visual", on_visual = false })
does not seem to be triggered when using flash.Steps To Reproduce
yt<char>
and the yanked text is not highlightedyy
correctly highlights the yanked lineExpected Behavior
Text is highlighted on yank.
Repro