Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All Hydra colors except pink cause neovim UI to freeze #84

Open
AlexKurisu opened this issue Apr 24, 2023 · 1 comment
Open

All Hydra colors except pink cause neovim UI to freeze #84

AlexKurisu opened this issue Apr 24, 2023 · 1 comment

Comments

@AlexKurisu
Copy link

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,
        },
    },
})
@llllvvuu
Copy link

llllvvuu commented Sep 27, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants