dashboard.lua 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. local status, db = pcall(require, "dashboard")
  2. if not status then
  3. vim.notify("没有找到 dashboard")
  4. return
  5. end
  6. db.setup({
  7. theme = 'doom',
  8. config = {
  9. header = {[[]], [[]], [[]], [[]], [[]], [[]], [[]], [[]],
  10. [[ ▀████▀▄▄ ▄█ ]],
  11. [[ █▀ ▀▀▄▄▄▄▄ ▄▄▀▀█ ]],
  12. [[ ▄ █ ▀▀▀▀▄ ▄▀ ]],
  13. [[ ▄▀ ▀▄ ▀▄ ▀▄▀ ]],
  14. [[ ▄▀ █ █▀ ▄█▀▄ ▄█ ]],
  15. [[ ▀▄ ▀▄ █ ▀██▀ ██▄█ ]],
  16. [[ ▀▄ ▄▀ █ ▄██▄ ▄ ▄ ▀▀ █ ]],
  17. [[ █ ▄▀ █ ▀██▀ ▀▀ ▀▀ ▄▀ ]],
  18. [[ █ █ █ ▄▄ ▄▀ ]], [[]], [[]], [[]], [[]], [[]], [[]], [[]], [[]]}, -- your header
  19. center = {{
  20. icon = ' ',
  21. icon_hl = 'Title',
  22. desc = 'Find File ',
  23. desc_hl = 'String',
  24. key = 'f',
  25. keymap = 'SPC f',
  26. key_hl = 'Number',
  27. action = 'lua print(2)'
  28. }, {
  29. icon = ' ',
  30. desc = 'Find Word',
  31. key = 'k',
  32. keymap = 'SPC k',
  33. action = 'lua print(3)'
  34. }, {
  35. icon = ' ',
  36. desc = 'Project',
  37. key = 'p',
  38. keymap = 'SPC p',
  39. action = 'lua print(4)'
  40. }},
  41. footer = db.custom_footer -- your footer
  42. }
  43. })
  44. db.custom_footer = function()
  45. local footer = {'', '🎉 Have fun with neovim'}
  46. if packer_plugins ~= nil then
  47. local count = #vim.tbl_keys(packer_plugins)
  48. footer[2] = '🎉 Neovim loaded ' .. count .. ' plugins'
  49. end
  50. return footer
  51. end