Compare commits

...

2 Commits

Author SHA1 Message Date
409
c00de730cf chore: lazy-lock.json 2024-08-10 15:51:24 +02:00
409
fb1a2318a5 feat: startup screen 2024-08-10 15:51:18 +02:00
3 changed files with 90 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
{
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"LuaSnip": { "branch": "master", "commit": "b84eeb3641b08324287587b426ec974b888390d9" },
"alpha-nvim": { "branch": "main", "commit": "36e4baca9533ec87afa948fe20a0a1c4897a6a6e" },
"barbecue.nvim": { "branch": "main", "commit": "cd7e7da622d68136e13721865b4d919efd6325ed" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
@@ -27,10 +28,10 @@
"noice.nvim": { "branch": "main", "commit": "448bb9c524a7601035449210838e374a30153172" },
"nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" },
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
"nvim-lspconfig": { "branch": "master", "commit": "652386deae739e38fa1bcf2f06e3e7de9b3436ba" },
"nvim-lspconfig": { "branch": "master", "commit": "ff97d376b1d22b2eaf9274605531babf0cd0cf21" },
"nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" },
"nvim-tree-docs": { "branch": "master", "commit": "5db023d783da1e55339e5e25caaf72a59597e626" },
"nvim-treesitter": { "branch": "master", "commit": "3d1f5e7df8d9981ec0bcf4aa635c0cc0a7ee89d9" },
"nvim-treesitter": { "branch": "master", "commit": "8a966f32c973511f9697264b3533e9846d29fd09" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "6b5f95aa4d24f2c629a74f2c935c702b08dbde62" },
"nvim-web-devicons": { "branch": "master", "commit": "3722e3d1fb5fe1896a104eb489e8f8651260b520" },
"oil.nvim": { "branch": "master", "commit": "fcca212c2e966fc3dec1d4baf888e670631d25d1" },

View File

@@ -0,0 +1,85 @@
return {
{
"goolord/alpha-nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
lazy = false,
keys = {
{
"<leader><leader>",
function()
if vim.bo.filetype ~= "alpha" then
vim.cmd("Alpha")
end
end,
desc = "Home screen",
}
},
config = function()
local dashboard = require("alpha.themes.dashboard")
dashboard.section.header.val = {
" @@@ @@@@@@@@ @@@@@@ ",
" @@@@ @@@@@@@@@@ @@@@@@@@ ",
" @@!@! @@! @@@@ @@! @@@ ",
" !@!!@! !@! @!@!@ !@! @!@ ",
" @!! @!! @!@ @! !@! !!@!!@!! ",
"!!! !@! !@!!! !!! !!@!!! ",
":!!:!:!!: !!:! !!! !!! ",
"!:::!!::: :!: !:! !:! ",
" ::: ::::::: :: ::::: :: ",
" ::: : : : : : : : ",
}
dashboard.section.header.opts.hl = "DashboardHeader"
dashboard.section.footer.hl = "DashboardFooter"
dashboard.leader = "LDR"
--- @param shortcut string Shortcut string of a button mapping
--- @param desc string Real text description of the mapping
--- @param rhs string? Righthand side of mapping if defining a new mapping (_optional_)
--- @param map_opts table? `keymap.set` options used during keymap creating (_optional_)
dashboard.button = function(shortcut, desc, rhs, map_opts)
local lhs = shortcut:gsub("%s", ""):gsub(dashboard.leader, "<Leader>")
local default_map_opts = { noremap = true, silent = true, nowait = true, desc = desc }
local leader = vim.g.mapleader
if leader == " " then
leader = "󱁐"
end
return {
type = "button",
val = desc,
on_press = function()
vim.api.nvim_feedkeys(
vim.api.nvim_replace_termcodes(rhs or lhs .. "<Ignore>", true, false, true),
"t",
false
)
end,
opts = {
position = "center",
shortcut = shortcut:gsub(dashboard.leader, leader),
cursor = -2,
width = 36,
align_shortcut = "right",
hl = "DashboardCenter",
hl_shortcut = "DashboardShortcut",
keymap = rhs and { "n", lhs, rhs, require("astrocore").extend_tbl(default_map_opts, map_opts) },
},
}
end
dashboard.section.buttons.val = {
dashboard.button("LDR LDR ", " Return to this screen"),
dashboard.button("LDR p v", " Explore"),
dashboard.button("LDR p f", " Find File"),
dashboard.button("LDR p f", " Find Git File"),
dashboard.button("LDR p l", " Find Word"),
}
require("alpha").setup(dashboard.config)
end,
},
}

View File

@@ -17,6 +17,8 @@ return {
vim.api.nvim_set_hl(0, "TabLine", { fg = "#f8f8f2", bg = "#44475a" })
vim.api.nvim_set_hl(0, "TabLineSel", { fg = "#282a36", bg = "#50fa7b", bold = true })
vim.api.nvim_set_hl(0, "DashboardHeader", { fg = "#50fa7b" })
vim.api.nvim_set_hl(0, "DashboardShortCut", { fg = "#bd93f9" })
end,
},
}