From 787e6a02b1661c33ed7b15616a7c403d7b237201 Mon Sep 17 00:00:00 2001
From: Alfred Burgess <alfred.burgess95@gmail.com>
Date: Wed, 17 Apr 2024 17:30:11 +0800
Subject: [PATCH] Changed dashboard plugin

Changed dashboard from alpha to dashboard and set some custome commands.
---
 lua/plugins/dashboard.lua | 42 ++++++++++++++++++++++++++++++++-------
 1 file changed, 35 insertions(+), 7 deletions(-)

diff --git a/lua/plugins/dashboard.lua b/lua/plugins/dashboard.lua
index 470ee0a..1503e71 100644
--- a/lua/plugins/dashboard.lua
+++ b/lua/plugins/dashboard.lua
@@ -10,12 +10,40 @@ local logo_spooky = {
   [[ ▐         ▐                            ▐       ▐ ▐    ▐    ]]
 }
 
+local commands = {
+  { icon = '󰊳 ', desc = 'Update', group = '@property', action = 'Lazy update', key = 'u' },
+  { icon = 'ï…› ', desc = 'New File', key = 'e', keymap = '', action = 'lua print("todo")'},
+  { icon = '󰈞 ', desc = 'Find File', key = 'b', keymap = 'SPC f f', action = 'Telescope find_files' },
+  { icon = '󰈬 ', desc = 'Find Word', key = 'g', keymap = 'SPC f g', action = 'Telescope live_grep' },
+  { icon = 'ï‘¡ ', desc = 'Bookmarks', key = 'b', keymap = 'SPC f m', action = 'lua print("todo")' },
+  { icon = 'ó°Š„ ', desc = 'Recent Files', key = 'h', keymap = 'SPC f h', action = 'lua print("todo")' },
+  --{ icon = ' ', desc = 'Find Dotfiles', key = 'd', keymap = 'SPC f d', action = 'Telescope dotfiles' },
+  { icon = 'î«’ ', desc = 'Last Session', key = 's', keymap = 'SPC s l', action = 'lua print("todo")'},
+  { icon = '? ', desc = 'Help', key = '?', keymap = 'SPC f h', action = 'Telescope help_tags' },
+}
+
+local dashboard_config = {
+  theme = 'doom',
+  config = {
+    week_header = {
+      enable = true,
+    },
+    --header = {}, --your header
+    center = commands,
+    footer = {}  --your footer
+  }
+}
+
+local dashboard = {
+  'nvimdev/dashboard-nvim',
+  event = 'VimEnter',
+  config = function()
+    local dashboard = require('dashboard')
+    dashboard.setup( dashboard_config )
+  end,
+  requires = {'nvim-tree/nvim-web-devicons'}
+}
+
 return {
-  "goolord/alpha-nvim",
-  dependencies = { "nvim-tree/nvim-web-devicons" },
-  config = function ()
-    local dashboard = require('alpha.themes.dashboard')
-    require('alpha').setup( dashboard.opts )
-    dashboard.section.header.val = logo_spooky
-  end
+  dashboard,
 }
-- 
GitLab