flocon/home/base/programs/nixvim/plugins/alpha.nix

69 lines
2.6 KiB
Nix
Raw Normal View History

2024-08-27 14:10:04 +00:00
{ ... }:
{
programs.nixvim = {
plugins = {
alpha = {
enable = true;
layout = [
{
type = "padding";
val = 2;
}
{
opts = {
hl = "Keyword";
position = "center";
};
type = "text";
val = [
""
""
""
""
""
""
""
""
""
""
""
""
""
""
];
}
{
type = "padding";
val = 2;
}
{
type = "group";
val = let
mkButton = shortcut: cmd: val: hl: {
type = "button";
inherit val;
opts = {
inherit hl shortcut;
keymap = [ "n" shortcut cmd { } ];
position = "center";
cursor = 0;
width = 40;
align_shortcut = "right";
hl_shortcut = "Keyword";
};
};
in [
(mkButton "f" "<CMD>:Telescope find_files<CR>" " Find File"
"Operator")
(mkButton "p" "<CMD>:Telescope projects<CR>" " Projects"
"Operator")
(mkButton "q" "<CMD>qa<CR>" "󰈆 Quit" "Error")
];
}
];
};
};
};
}