feat(alpha): improved colors

This commit is contained in:
Folke Lemaitre 2022-12-30 23:34:17 +01:00
parent 108c471ab5
commit 0266bb851d
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -68,10 +68,19 @@ return {
dashboard.button("c", "" .. " Config", ":e $MYVIMRC <CR>"), dashboard.button("c", "" .. " Config", ":e $MYVIMRC <CR>"),
dashboard.button("q", "" .. " Quit", ":qa<CR>"), dashboard.button("q", "" .. " Quit", ":qa<CR>"),
} }
dashboard.section.footer.opts.hl = "Type" for _, button in ipairs(dashboard.section.buttons.val) do
dashboard.section.header.opts.hl = "Include" button.opts.hl = "AlphaButtons"
dashboard.section.buttons.opts.hl = "Keyword" button.opts.hl_shortcut = "AlphaShortcut"
dashboard.opts.opts.noautocmd = true end
dashboard.section.footer.opts.hl = "AlphaFooter"
dashboard.section.header.opts.hl = "AlphaHeader"
dashboard.section.buttons.opts.hl = "AlphaButtons"
dashboard.opts.layout[1].val = 8
if vim.bo[0].filetype == "lazy" then
vim.notify("Missing plugins installed!", vim.log.levels.INFO, { title = "LazyVim" })
vim.cmd.close()
end
require("alpha").setup(dashboard.opts) require("alpha").setup(dashboard.opts)
@ -80,7 +89,7 @@ return {
callback = function() callback = function()
local stats = require("lazy").stats() local stats = require("lazy").stats()
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100) local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
dashboard.section.footer.val = "🎉 Neovim loaded " .. stats.count .. " plugins in " .. ms .. "ms" dashboard.section.footer.val = " Neovim loaded " .. stats.count .. " plugins in " .. ms .. "ms"
pcall(vim.cmd.AlphaRedraw) pcall(vim.cmd.AlphaRedraw)
end, end,
}) })