hydra.nvim icon indicating copy to clipboard operation
hydra.nvim copied to clipboard

All Hydra colors except pink cause neovim UI to freeze

Open AlexKurisu opened this issue 1 year ago • 1 comments

For example, the following, when used with https://github.com/rcarriga/nvim-notify and https://github.com/folke/noice.nvim, will not display any notifications while Hydra is active

Hydra({
    name = "TEST",
    mode = "n",
    body = "<Leader>t",
    hint = [[_f_ => Test key]],
    config = {
        color = "red",
        invoke_on_body = true,
    },
    heads = {
        {
            "f",
            function()
                vim.notify("Testing hydra...")
            end,
        },
    },
})

AlexKurisu avatar Apr 24 '23 14:04 AlexKurisu

I think this is due to the technique used:

https://github.com/anuvyklack/hydra.nvim/blob/master/CONTRIBUTING.md

Every hydra (except pink) is an infinite chain of <Plug>(...) keybindings.

I do have this problem as well with any plugin that uses autocommands (which is almost all of them). But I'm not sure it can be fixed without an entirely different approach. This approach is an "easy" way to control response to all input. I don't know if it's feasible to switch to the layer approach, because that'd require looping through and remapping every key. But maybe?

llllvvuu avatar Sep 27 '23 08:09 llllvvuu