dashboard.lua 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. -- 用户配置启动页
  2. return {
  3. 'nvimdev/dashboard-nvim',
  4. event = 'VimEnter',
  5. config = function()
  6. -- keymap
  7. vim.keymap.set("n", "<leader>hh", ":Dashboard<CR>", {})
  8. vim.keymap.set("n", "<leader>u", ":Lazy update<CR>", {})
  9. require('dashboard').setup {
  10. -- config
  11. theme = 'doom',
  12. config = {
  13. header = { [[]], [[]], [[]], [[]], [[]], [[]], [[]], [[]],
  14. [[ ▀████▀▄▄ ▄█ ]],
  15. [[ █▀ ▀▀▄▄▄▄▄ ▄▄▀▀█ ]],
  16. [[ ▄ █ ▀▀▀▀▄ ▄▀ ]],
  17. [[ ▄▀ ▀▄ ▀▄ ▀▄▀ ]],
  18. [[ ▄▀ █ █▀ ▄█▀▄ ▄█ ]],
  19. [[ ▀▄ ▀▄ █ ▀██▀ ██▄█ ]],
  20. [[ ▀▄ ▄▀ █ ▄██▄ ▄ ▄ ▀▀ █ ]],
  21. [[ █ ▄▀ █ ▀██▀ ▀▀ ▀▀ ▄▀ ]],
  22. [[ █ █ █ ▄▄ ▄▀ ]], [[]], [[]], [[]], [[]], [[]], [[]], [[]], [[]] }, -- your header
  23. center = { {
  24. icon = " ",
  25. icon_hl = 'Title',
  26. desc = 'Find File ',
  27. desc_hl = 'String',
  28. key = 'f',
  29. keymap = 'SPC f',
  30. key_hl = 'Number',
  31. }, {
  32. icon = ' ',
  33. desc = 'Find Word',
  34. key = 'k',
  35. keymap = 'SPC k',
  36. }, {
  37. icon = ' ',
  38. desc = 'Project',
  39. key = 'p',
  40. keymap = 'SPC p',
  41. }, {
  42. icon = '󰚰 ',
  43. desc = 'Plugins Update',
  44. key = 'u',
  45. name = "DsStore",
  46. keymap = 'SPC u',
  47. } },
  48. -- your footer
  49. footer = function()
  50. local stats = require("lazy").stats()
  51. local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
  52. return { '🧑🏻sdaduanbilei', '🎉 Have fun with neovim 🎉', "🎉 Neovim loaded " ..
  53. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" }
  54. end
  55. }
  56. }
  57. end,
  58. dependencies = { { 'nvim-tree/nvim-web-devicons' } },
  59. }