refactor(nvim): Move snacks.dashboard to separate file
This commit is contained in:
53
home/editors/nvim/plugins/utils/snacks/dashboard.nix
Normal file
53
home/editors/nvim/plugins/utils/snacks/dashboard.nix
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
let
|
||||||
|
themes = import ./themes.nix;
|
||||||
|
theme = themes.dg_baby;
|
||||||
|
in {
|
||||||
|
enabled = true;
|
||||||
|
preset = {
|
||||||
|
inherit (theme) header;
|
||||||
|
keys = [
|
||||||
|
{
|
||||||
|
icon = " ";
|
||||||
|
key = "f";
|
||||||
|
desc = "Find File";
|
||||||
|
action = ":lua Snacks.dashboard.pick('files')";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
icon = " ";
|
||||||
|
key = "n";
|
||||||
|
desc = "New File";
|
||||||
|
action = ":ene | startinsert";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
icon = " ";
|
||||||
|
key = "l";
|
||||||
|
desc = "Live Grep";
|
||||||
|
action = ":lua Snacks.dashboard.pick('live_grep')";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
icon = " ";
|
||||||
|
key = "o";
|
||||||
|
desc = "Old Files";
|
||||||
|
action = ":lua Snacks.dashboard.pick('oldfiles')";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
icon = " ";
|
||||||
|
key = "q";
|
||||||
|
desc = "Quit";
|
||||||
|
action = ":qa";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
sections = [
|
||||||
|
{section = "header";}
|
||||||
|
{
|
||||||
|
section = "keys";
|
||||||
|
gap = 1;
|
||||||
|
padding = 1;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
title = theme.quote;
|
||||||
|
align = "center";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -11,59 +11,7 @@
|
|||||||
image.enabled = true;
|
image.enabled = true;
|
||||||
quickfile.enabled = true;
|
quickfile.enabled = true;
|
||||||
rename.enabled = true;
|
rename.enabled = true;
|
||||||
dashboard = let
|
dashboard = import ./dashboard.nix;
|
||||||
themes = import ./themes.nix;
|
|
||||||
theme = themes.dg_baby;
|
|
||||||
in {
|
|
||||||
enabled = true;
|
|
||||||
preset = {
|
|
||||||
inherit (theme) header;
|
|
||||||
keys = [
|
|
||||||
{
|
|
||||||
icon = " ";
|
|
||||||
key = "f";
|
|
||||||
desc = "Find File";
|
|
||||||
action = ":lua Snacks.dashboard.pick('files')";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
icon = " ";
|
|
||||||
key = "n";
|
|
||||||
desc = "New File";
|
|
||||||
action = ":ene | startinsert";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
icon = " ";
|
|
||||||
key = "l";
|
|
||||||
desc = "Live Grep";
|
|
||||||
action = ":lua Snacks.dashboard.pick('live_grep')";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
icon = " ";
|
|
||||||
key = "o";
|
|
||||||
desc = "Old Files";
|
|
||||||
action = ":lua Snacks.dashboard.pick('oldfiles')";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
icon = " ";
|
|
||||||
key = "q";
|
|
||||||
desc = "Quit";
|
|
||||||
action = ":qa";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
sections = [
|
|
||||||
{section = "header";}
|
|
||||||
{
|
|
||||||
section = "keys";
|
|
||||||
gap = 1;
|
|
||||||
padding = 1;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
title = theme.quote;
|
|
||||||
align = "center";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user