hydra.nvim
hydra.nvim copied to clipboard
Bug: When reaching top of buffer amaranth hydra exits.
Upon reaching of the top of the buffer using u
in this hydra it exits but the hint is still present. No error seems to happen.
Hydra({
name = "Move",
mode = "n",
body = "<Space>z",
config = {
timeout = false,
color = 'amaranth',
},
heads = {
-- Move Up and Down
{ "u" , "<C-u>"},
{ "d" , "<C-d>", {desc = "^/v"} },
{ "l" , "zh"},
{ "r" , "zl", {desc = "</>"}},
-- Move Faster
{ "U" , "<C-b>"},
{ "D" , "<C-f>", {desc = "page ^/v"}},
{ "R" , "zL"},
{ "L" , "zR", {desc = "half screen </>"}},
-- Move view around cursor
{ "t" , "zt"},
{ "b" , "zb", {desc = "around line ^/v"}},
{ "m" , "zz", {desc = "middle"}},
{ "l" , "zs"},
{ "r" , "ze", {desc = "</>"}},
},
})
I have similar problem, hydra exit upon reaching of the top or the end of the buffer, without error.
local scroll = Hydra({ mode = 'n', heads = {
{ 'u', '5k' },
{ 'e', '5j' },
} })
map({ 'n', 'x' }, "<C-e>", function() scroll:activate() fn.execute("normal! 5j") end)
map({ 'n', 'x' }, "<C-u>", function() scroll:activate() fn.execute("normal! 5k") end)
I finally figured out how to fix it!