dashboard.lua 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 k33',
  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. icon = ' ',
  42. desc = 'Project',
  43. key = 'u',
  44. keymap = 'SPC u',
  45. action = 'lua print(4)'
  46. }},
  47. footer = db.custom_footer -- your footer
  48. }
  49. })
  50. db.custom_footer = function()
  51. local footer = {'', '🎉 Have fun with neovim'}
  52. if packer_plugins ~= nil then
  53. local count = #vim.tbl_keys(packer_plugins)
  54. footer[2] = '🎉 Neovim loaded ' .. count .. ' plugins'
  55. end
  56. return footer
  57. end