Skip to content
This repository was archived by the owner on Feb 23, 2025. It is now read-only.

After connect, vim.highlight.on_yank seems to be triggered automatically (Neovim) #384

@formsandlines

Description

@formsandlines

After connecting to an nREPL, as soon as I type any character that is not either one of (){}[]'\ (probably some others too), the top-level form (with all its nested forms) gets highlighted as if a yank has occurred.

I have tried to disable all the other plugins that might cause a conflict (even coc, treesitter and my theme), but this seems to be an issue with vim-iced. It also doesn't matter what I set my clipboard to. The highlighting only disappears after I delete my TextYankPost autocommand, which looks like this:

augroup highlight_yank
    autocmd!
    au TextYankPost * silent! lua vim.highlight.on_yank{higroup="IncSearch", timeout=200}
augroup END

Here is a quick demonstration (wait for the part after :IcedConnect):

220215_vim-iced-highlight-bug

A temporary fix I found is to add on_visual=false to the highlight.on_yank options. It seems that the issue has something to do with visual selection, although it occurs in normal mode.

This is not ideal, since I still want to highlight yanked text in visual mode, but it is a compromise I can live with for now (considering the amazing IDE-ish experience vim-iced has to offer).

Metadata

Metadata

Assignees

No one assigned

    Labels

    neovimNeovim's behaviors

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions