You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.1 KiB

  1. return {
  2. 'goolord/alpha-nvim',
  3. dependencies = {
  4. 'echasnovski/mini.icons',
  5. {
  6. "MaximilianLloyd/ascii.nvim",
  7. dependencies = {
  8. "MunifTanjim/nui.nvim"
  9. },
  10. },
  11. },
  12. config = function ()
  13. local alpha = require("alpha")
  14. local dashboard = require("alpha.themes.dashboard")
  15. -- Set the ASCII art
  16. dashboard.section.header.val = require("ascii").art.text.neovim.lean
  17. -- Remove other sections (buttons, footer, etc.) to show only the ASCII art
  18. dashboard.section.buttons.val = {}
  19. dashboard.section.footer.val = {}
  20. local function get_center_padding()
  21. local total_lines = vim.fn.winheight(0)
  22. local art_lines = #dashboard.section.header.val
  23. return math.floor((total_lines - art_lines) / 2)
  24. end
  25. -- Center the header
  26. dashboard.opts.layout = {
  27. { type = "padding", val = get_center_padding() }, -- Add some vertical padding
  28. dashboard.section.header,
  29. }
  30. -- Set up alpha with the modified dashboard
  31. alpha.setup(dashboard.opts)
  32. end
  33. }