dashboard.lua 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. }, {
  28. icon = ' ',
  29. desc = 'Find Word',
  30. key = 'k',
  31. keymap = 'SPC k',
  32. }, {
  33. icon = ' ',
  34. desc = 'Project',
  35. key = 'p',
  36. keymap = 'SPC p',
  37. }, {
  38. icon = '󰚰 ',
  39. desc = 'Plugins Update',
  40. key = 'u',
  41. name = "DsStore",
  42. keymap = 'SPC u',
  43. }},
  44. footer = db.custom_footer -- your footer
  45. }
  46. })
  47. db.custom_footer = function()
  48. local footer = {'sdaduanbilei', ' Have fun with neovim'}
  49. if packer_plugins ~= nil then
  50. local count = #vim.tbl_keys(packer_plugins)
  51. footer[2] = '🎉 Neovim loaded ' .. count .. ' plugins'
  52. end
  53. return footer
  54. end