-
Notifications
You must be signed in to change notification settings - Fork 23
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
Hydra prevents vim.diagnostic.goto_next()
from opening float window
#87
Comments
I'm observing a similar behaviour, where only after exiting the hydra commands actually run. It feels like they are buffered. In my particular case I have a hydra that sends a line of code to a repl but only after exiting the hydra the line gets actually shown and run on the repl. Here is a minimal example using Vigemus/iron.nvim hydra = require "hydra"
iron = require "iron.core"
hydra({
name = "TestHydra",
mode = { "n" },
body = "<leader>u",
heads = {
{
"x",
function()
iron.send("python", "print('hello')")
end,
{ desc = "Run command" },
},
{ "q", nil, { exit = true, nowait = true, desc = "exit" } },
},
}) Running the hydra opens a new empty split, where the repl should show up. Only after exiting the hydra the repl gets populated and the line of code run. If you then exit and run again the hydra nothing happens until you exit once more. |
@Rodrigodd After some playing around I found that making a pink hydra fixed my issue. You can try doing this by updating your hydra to: hydra({
name = "TestHydra",
mode = { "n" },
config = {
invoke_on_body = true,
color = "pink",
},
body = "<leader>u",
--- more
}) |
@GCBallesteros Can confirm, setting Only problem was that my mappings started conflicting with I looked at the implementation of |
In my investigations I thought about that too and commented out most of the code in With |
Hi, thank you very much for this excellent plugin, really helps with some keymaps. But I have a minor problem.
I am using Hydra with the following mapping:
When you call
vim.diagnostic.goto_next()
it, by default, callsvim.diagnostic.open_float()
, that opens a floating window with the diagnostic description. But Hydra appears to be preventing that from happening, if I run the mapping, only when I exit hydra with the Esc key that the floating window appears.I have found this Reddit post describing the same problem in point 2. One of the comments say that "2 [looks like] as (neovim) design decision to not use floating windows and the additional complexity of handling them", but not sure what that is really implying.
There is anything that could be done to prevent this problem?
The text was updated successfully, but these errors were encountered: