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

68 lines
2.6 KiB
Nix
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ ... }:
{
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")
];
}
];
};
};
};
}