From 7801be57d6378f16717bb122ff2bc6cbbfb9d15a Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Thu, 18 Jan 2024 00:04:49 +0100 Subject: [PATCH] plugins/alpha: fix example (for buttons) --- plugins/utils/alpha.nix | 4 ++++ tests/test-sources/plugins/utils/alpha.nix | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/plugins/utils/alpha.nix b/plugins/utils/alpha.nix index c3ed4132..d425581f 100644 --- a/plugins/utils/alpha.nix +++ b/plugins/utils/alpha.nix @@ -104,12 +104,16 @@ in { type = "group"; val = [ { + type = "button"; val = " New file"; on_press.__raw = "function() vim.cmd[[ene]] end"; + opts.shortcut = "n"; } { + type = "button"; val = " Quit Neovim"; on_press.__raw = "function() vim.cmd[[qa]] end"; + opts.shortcut = "q"; } ]; } diff --git a/tests/test-sources/plugins/utils/alpha.nix b/tests/test-sources/plugins/utils/alpha.nix index b47e8a37..ef5c5330 100644 --- a/tests/test-sources/plugins/utils/alpha.nix +++ b/tests/test-sources/plugins/utils/alpha.nix @@ -46,12 +46,16 @@ type = "group"; val = [ { + type = "button"; val = " New file"; on_press.__raw = "function() vim.cmd[[ene]] end"; + opts.shortcut = "n"; } { + type = "button"; val = " Quit Neovim"; on_press.__raw = "function() vim.cmd[[qa]] end"; + opts.shortcut = "q"; } ]; }