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.

48 lines
1.8 KiB

  1. return {
  2. 'goolord/alpha-nvim',
  3. dependencies = {
  4. 'echasnovski/mini.icons',
  5. },
  6. config = function ()
  7. local alpha = require("alpha")
  8. local dashboard = require("alpha.themes.dashboard")
  9. local neovim_lean = {
  10. [[ ]],
  11. [[ _/ _/ _/ _/ _/ ]],
  12. [[ _/_/ _/ _/_/ _/_/ _/ _/ _/_/_/ _/_/ ]],
  13. [[ _/ _/ _/ _/_/_/_/ _/ _/ _/ _/ _/ _/ _/ _/ ]],
  14. [[ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ ]],
  15. [[ _/ _/ _/_/_/ _/_/ _/ _/ _/ _/ _/ ]],
  16. [[ ]],
  17. }
  18. local neovim_decimal = {
  19. [[ ]],
  20. [[ 78 101 111 86 105 109 ]],
  21. [[ ]],
  22. }
  23. -- Set the ASCII art
  24. dashboard.section.header.val = neovim_lean
  25. -- Remove other sections (buttons, footer, etc.) to show only the ASCII art
  26. dashboard.section.buttons.val = {}
  27. dashboard.section.footer.val = {}
  28. local function get_center_padding()
  29. local total_lines = vim.fn.winheight(0)
  30. local art_lines = #dashboard.section.header.val
  31. return math.floor((total_lines - art_lines) / 2)
  32. end
  33. -- Center the header
  34. dashboard.opts.layout = {
  35. { type = "padding", val = get_center_padding() }, -- Add some vertical padding
  36. dashboard.section.header,
  37. }
  38. -- Set up alpha with the modified dashboard
  39. alpha.setup(dashboard.opts)
  40. end
  41. }