Need help with buttons and keymaps #262
-
I'm reworking my config given the recent changes, and my
And then on top of that, I absolutely cannot execute any keybind. I'll press e, f, g, and r on my keyboard and nothing will happen.
Configurationrequire("alpha").setup({
["layout"] = {
{ ["type"] = "padding", ["val"] = 2 },
{
["opts"] = { ["hl"] = "Identifier", ["position"] = "center" },
["type"] = "text",
["val"] = {
"⠀⠀⠀⠀⢀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ",
"⠀⠀⠁⠁⠄⡀⠢⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ",
"⠀⠀⠀⠀⠁⠄⠂⡐⢐⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠁⠄⠂⡈⠢⡀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠁⠄⠂⡑⢄⠂⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠡⠀⢂⠑⢄⠂⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠠⠐⡀⠑⢔⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⡀⢀⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⢀⠡⢀⠑⢄⠂⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠄⠔⠐⡁⠡⢁⠨⠀⢂⠐⡀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⠀⡂⠠⠑⢄⠠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠂⠡⠐⡀⠅⠂⡐⢈⠠⠀⠅⡀⢂⠠⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⢀⠡⠀⠂⠡⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠂⠈⠄⡀⠂⠄⠡⠀⠂⠄⠡⠐⢀⠂⠠⡁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⡈⠐⡈⠀⢂⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠄⠄⠄⠂⠄⠂⡐⠀⠄⠀⠁⠄⠂⢈⠠⠁⠌⠐⢈⠐⠠⠈⠄⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠡⢀⠅⠂⠠⢁⠂⡀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠔⡉⠄⠂⢂⠨⠐⠈⠄⠠⢁⠨⠀⠄⠈⡐⠀⠐⠈⠠⠈⠄⠂⡁⠌⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠄⠠⠨⠐⡀⢂⠠⠀⠀⠀⠀⠀⠀⠀⡠⠃⡐⠀⡂⠡⠀⢂⠨⢀⠁⡂⠐⡀⠡⠈⠠⠀⢂⠈⠄⠡⢈⠠⠁⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢁⠊⠀⠄⠀⠂⡁⡂⠄⡀⠀⠐⠀⡂⠄⠡⠀⢂⠡⠀⡂⠄⢂⠠⠁⢀⠂⡈⠄⠡⠀⢂⠁⢂⠐⠠⠈⠄⠀⠀⠠⠐⠀⠀⠀⠀⠀⠀⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠂⢀⢁⠂⠄⠂⡐⢀⠁⡂⠀⡐⢀⠡⢈⠠⠀⠅⡀⠂⠐⡀⢐⠀⢂⠐⡀⠡⠈⠄⡈⠄⠂⡁⠂⡁⠀⠀⠀⠀⠀⠠⠀⠂⠀⠀⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠂⠨⢀⠡⠀⠂⡐⢀⠂⢐⠀⠂⠄⠂⠡⠐⢀⢁⠡⠐⡀⠌⠠⠐⢀⠂⠡⠐⠀⠂⠡⠀⡡⡆⠀⠀⠀⠀⠀⠀⠀⠨⠀⠄⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠁⠀⡂⠈⠄⡀⠂⡀⢂⠈⠄⠡⠈⠄⠡⠠⠀⡂⠐⡀⠂⡁⠌⠀⡐⠐⡀⢂⠠⠀⠊⠎⢞⠄⠀⠀⠀⠀⢀⠈⠄⡁⠌⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠄⠊⠀⠀⠀⠀⡁⠄⠐⡀⢂⠡⢈⠂⡁⠂⠁⠀⠂⠁⠀⠁⠀⡁⠄⠂⡁⢐⠀⠂⠄⢂⠈⠄⢂⠠⠁⡀⢀⠠⠐⢀⠂⡐⠀⠅⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠔⠁⠀⠈⠠⠐⢀⠀⠅⠠⠈⠄⠐⠠⠐⠀⠂⠀⢀⣶⣶⣶⠖⠋⢀⠐⡀⠂⡁⢐⠀⠌⠠⠁⠄⢂⠈⠄⠠⠁⠄⠂⡐⢈⠠⠐⢀⠁⠅⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠂⠀⠈⠀⠁⠈⠈⡀⠀⠀⠐⠚⠛⠛⠛⠁⠀⠀⠂⡐⡀⠡⠐⢀⠂⡈⠄⠁⠂⠐⠀⡁⠄⡁⢂⠁⠄⠂⡐⢈⠀⡂⢑⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⢀⠀⡂⠄⢁⠂⢂⠠⠀⠄⢀⠂⡁⡁⠅⠂⢌⢐⠡⢀⠂⠀⠀⠀⡐⢀⠡⠀⠂⠄⠂⡐⠈⠄⠐⡀⠂⠄⠂⠄⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠅⡀⠂⠐⠀⠂⠈⠄⢂⠐⡀⠡⠈⠄⡂⢂⠄⠂⠡⠐⠠⠈⠄⢀⠠⠀⠅⡀⢂⠀⠡⠈⠄⡁⢐⠈⠄⢁⠐⡈⠠⢁⠨⢀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠁⠀⡀⡀⡀⡠⡀⡀⠀⠀⠀⠈⠀⠁⡂⡐⠨⠀⠁⢈⢀⠠⠠⠁⡈⠄⠡⠀⢂⠈⠄⡈⠠⠐⠀⠄⠨⠀⢂⠐⡀⢂⠐⠠⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣪⢪⡺⡜⣎⠎⡑⡦⡂⠢⡱⣕⡲⢐⢬⢢⠑⠀⠀⡂⠂⡁⠀⠄⠈⠄⠐⡀⠡⠐⠀⡈⠠⠈⠄⠡⠀⠂⠄⠂⠄⠅⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣪⣣⢳⡱⠃⢔⢸⢪⢝⠄⣇⡗⠠⢊⢮⡣⠃⠀⠀⡢⠡⡀⡂⠄⠂⢀⠁⠐⠈⢀⠔⠁⠁⠡⠨⢀⢁⠡⠈⢠⠊⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢐⢤⡰⡔⡆⢑⢐⢬⢣⡱⢱⢔⢬⠨⢸⣸⠈⡂⠁⠀⠀⠁⠐⠈⠐⡁⠄⡀⠂⠀⠂⠀⠂⠁⡀⠂⠀⠂⠄⠕⠁⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⣪⢮⢺⢜⢞⢄⢢⢳⢕⢡⢏⢮⢳⡱⢅⠂⠊⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⢐⠀⡁⢀⠁⡀⢁⠀⠄⠁⠂⠁⠀⠀⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⡳⣣⢳⢕⡳⡹⣜⢬⡸⣸⡱⠝⠜⠁⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠝⡮⡪⣇⢗⢝⡎⣞⢜⢮⠪⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠁⠈⣕⢇⡏⡧⡳⠑⠑⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡐⠀⢰⢣⡳⡹⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢐⠀⢀⡏⡮⡊⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠆⠀⡲⡹⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠨⠀⢐⠭⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠂⠈⠘⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ",
},
},
{ ["type"] = "padding", ["val"] = 2 },
{
["type"] = "group",
["val"] = {
{
["on_press"] = vim.cmd("ene"),
["opts"] = { ["keymap"] = { "n", "e", "vim.cmd('ene')", { noremap = true } }, ["shortcut"] = "e" },
["type"] = "button",
["val"] = " > New file",
},
{
["on_press"] = require("telescope.builtin").find_files,
["opts"] = {
["keymap"] = { "n", "f", "require('telescope.builtin').find_files", { noremap = true } },
["shortcut"] = "f",
},
["type"] = "button",
["val"] = " > Find file",
},
{
["on_press"] = require("telescope.builtin").live_grep,
["opts"] = {
["keymap"] = { "n", "g", "require('telescope.builtin').live_grep", { noremap = true } },
["shortcut"] = "g",
},
["type"] = "button",
["val"] = " > Find Text (grep)",
},
{
["on_press"] = require("telescope.builtin").oldfiles,
["opts"] = {
["keymap"] = { "n", "r", "require('telescope.builtin').oldfiles", { noremap = true } },
["shortcut"] = "r",
},
["type"] = "button",
["val"] = " > Recent",
},
{
["on_press"] = vim.cmd("qa"),
["opts"] = { ["keymap"] = { "n", "q", "vim.cmd('qa')", { noremap = true } }, ["shortcut"] = "q" },
["type"] = "button",
["val"] = " > Quit NVIM",
},
},
},
},
}) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Did some more tinkering and got it figured out. I wrapped rhs in {
["type"] = "group",
["val"] = {
{
["on_press"] = vim.cmd("ene"),
["opts"] = {
["keymap"] = { "n", "e", "<cmd>lua vim.cmd('ene')<cr>", { noremap = true } },
["shortcut"] = "e",
},
["type"] = "button",
["val"] = " > New file",
},
{
["on_press"] = require("telescope.builtin").find_files,
["opts"] = {
["keymap"] = {
"n",
"f",
"<cmd>lua require('telescope.builtin').find_files()<cr>",
{ noremap = true },
},
["shortcut"] = "f",
},
["type"] = "button",
["val"] = " > Find file",
},
{
["on_press"] = require("telescope.builtin").live_grep,
["opts"] = {
["keymap"] = {
"n",
"g",
"<cmd>lua require('telescope.builtin').live_grep()<cr>",
{ noremap = true },
},
["shortcut"] = "g",
},
["type"] = "button",
["val"] = " > Find Text (grep)",
},
{
["on_press"] = require("telescope.builtin").oldfiles,
["opts"] = {
["keymap"] = {
"n",
"r",
"<cmd>lua require('telescope.builtin').oldfiles()<cr>",
{ noremap = true },
},
["shortcut"] = "r",
},
["type"] = "button",
["val"] = " > Recent",
},
{
["on_press__raw"] = "vim.cmd('qa')",
["opts"] = {
["keymap"] = { "n", "q", "<cmd>lua vim.cmd('qa')<cr>", { noremap = true } },
["shortcut"] = "q",
},
["type"] = "button",
["val"] = " > Quit NVIM",
},
},
}, |
Beta Was this translation helpful? Give feedback.
Did some more tinkering and got it figured out. I wrapped rhs in
<cmd>...<cr>
I also forgot the parentheses on the function calls to Telescope's pickers.
Now the config for the buttons looks like this: