feat(nvim/alpha): update dashboard to match lazyvim mostly

This commit is contained in:
Michael Thomas 2024-06-13 01:23:24 +02:00
parent 4281afe9cf
commit 7908f337e3

View File

@ -8,183 +8,154 @@
type = "padding"; type = "padding";
inherit val; inherit val;
}; };
shortcutOpts = {
position = "center";
cursor = 3;
width = 50;
align_shortcut = "right";
};
in [ in [
(padding 4) (padding 8)
{ {
opts = { opts = {
hl = "AlphaHeader"; hl = "Structure";
position = "center"; position = "center";
}; };
type = "text"; type = "text";
val = [ val = [
" " " "
" " " "
" " " "
" " " "
" " " "
" " " "
" "
" "
" "
" "
" git@github.com:redyf "
]; ];
} }
(padding 2) (padding 3)
{ {
type = "button"; type = "button";
val = " Find File"; val = " Find File";
on_press.raw = "require('telescope.builtin').find_files"; on_press.raw = "require('telescope.builtin').find_files";
opts = { opts =
# hl = "comment"; shortcutOpts
keymap = [ // {
"n" keymap = [
"f" "n"
":Telescope find_files <CR>" "f"
{ ":Telescope find_files <CR>"
noremap = true; {
silent = true; noremap = true;
nowait = true; silent = true;
} nowait = true;
]; }
shortcut = "f"; ];
shortcut = "f";
position = "center"; };
cursor = 3;
width = 38;
align_shortcut = "right";
hl_shortcut = "Keyword";
};
} }
(padding 1) (padding 1)
{ {
type = "button"; type = "button";
val = " New File"; val = " New File";
on_press.__raw = "function() vim.cmd[[ene]] end"; on_press.__raw = "function() vim.cmd[[ene]] end";
opts = { opts =
# hl = "comment"; shortcutOpts
keymap = [ // {
"n" keymap = [
"n" "n"
":ene <BAR> startinsert <CR>" "n"
{ ":ene <BAR> startinsert <CR>"
noremap = true; {
silent = true; noremap = true;
nowait = true; silent = true;
} nowait = true;
]; }
shortcut = "n"; ];
shortcut = "n";
position = "center"; };
cursor = 3;
width = 38;
align_shortcut = "right";
hl_shortcut = "Keyword";
};
} }
(padding 1) (padding 1)
{ {
type = "button"; type = "button";
val = "󰈚 Recent Files"; val = "󰈚 Recent Files";
on_press.raw = "require('telescope.builtin').oldfiles"; on_press.raw = "require('telescope.builtin').oldfiles";
opts = { opts =
# hl = "comment"; shortcutOpts
keymap = [ // {
"n" keymap = [
"r" "n"
":Telescope oldfiles <CR>" "r"
{ ":Telescope oldfiles <CR>"
noremap = true; {
silent = true; noremap = true;
nowait = true; silent = true;
} nowait = true;
]; }
shortcut = "r"; ];
shortcut = "r";
position = "center"; };
cursor = 3;
width = 38;
align_shortcut = "right";
hl_shortcut = "Keyword";
};
} }
(padding 1) (padding 1)
{ {
type = "button"; type = "button";
val = "󰈭 Find Word"; val = "󰈭 Find Word";
on_press.raw = "require('telescope.builtin').live_grep"; on_press.raw = "require('telescope.builtin').live_grep";
opts = { opts =
# hl = "comment"; shortcutOpts
keymap = [ // {
"n" keymap = [
"g" "n"
":Telescope live_grep <CR>" "g"
{ ":Telescope live_grep <CR>"
noremap = true; {
silent = true; noremap = true;
nowait = true; silent = true;
} nowait = true;
]; }
shortcut = "g"; ];
shortcut = "g";
position = "center"; };
cursor = 3;
width = 38;
align_shortcut = "right";
hl_shortcut = "Keyword";
};
} }
(padding 1) (padding 1)
{ {
type = "button"; type = "button";
val = " Restore Session"; val = " Restore Session";
on_press.raw = "require('persistence').load()"; on_press.raw = "require('persistence').load()";
opts = { opts =
# hl = "comment"; shortcutOpts
keymap = [ // {
"n" keymap = [
"s" "n"
":lua require('persistence').load()<cr>" "s"
{ ":lua require('persistence').load()<cr>"
noremap = true; {
silent = true; noremap = true;
nowait = true; silent = true;
} nowait = true;
]; }
shortcut = "s"; ];
shortcut = "s";
position = "center"; };
cursor = 3;
width = 38;
align_shortcut = "right";
hl_shortcut = "Keyword";
};
} }
(padding 1) (padding 1)
{ {
type = "button"; type = "button";
val = " Quit Neovim"; val = " Quit";
on_press.__raw = "function() vim.cmd[[qa]] end"; on_press.__raw = "function() vim.cmd[[qa]] end";
opts = { opts =
# hl = "comment"; shortcutOpts
keymap = [ // {
"n" keymap = [
"q" "n"
":qa<CR>" "q"
{ ":qa<CR>"
noremap = true; {
silent = true; noremap = true;
nowait = true; silent = true;
} nowait = true;
]; }
shortcut = "q"; ];
shortcut = "q";
position = "center"; };
cursor = 3;
width = 38;
align_shortcut = "right";
hl_shortcut = "Keyword";
};
} }
]; ];
}; };