From f16e5bc9f34bb75cac81310e861452dddaa7b1e6 Mon Sep 17 00:00:00 2001 From: Ephraim Siegfried Date: Wed, 8 May 2024 09:28:33 +0200 Subject: [PATCH] add nice ascii art to dashboard --- lua/plugins/ui/alpha.lua | 39 ++++++++++++++++++++++++++++++++++++++ lua/plugins/ui/startup.lua | 14 -------------- 2 files changed, 39 insertions(+), 14 deletions(-) create mode 100644 lua/plugins/ui/alpha.lua delete mode 100644 lua/plugins/ui/startup.lua diff --git a/lua/plugins/ui/alpha.lua b/lua/plugins/ui/alpha.lua new file mode 100644 index 0000000..b2dda1a --- /dev/null +++ b/lua/plugins/ui/alpha.lua @@ -0,0 +1,39 @@ +local logo = { + [[ ,]], + [[ ,-. _,---._ __ / \]], + [[ / ) .-' `./ / \]], + [[ ( ( ,' `/ /|]], + [[ \ `-" \'\ / |]], + [[ `. , \ \ / |]], + [[ /`. ,'-`----Y |]], + [[ ( ; | ']], + [[ | ,-. ,-' | /]], + [[ | | ( | nvim | /]], + [[ ) | \ `.___________|/]], + [[ `--' `--']], +} + +return { + "goolord/alpha-nvim", + priority = 900, + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + local alpha = require("alpha") + local dashboard = require("alpha.themes.dashboard") + + -- Set header + + dashboard.section.header.val = logo + + -- Set menu + dashboard.section.buttons.val = { + dashboard.button("e", "  New file", ":ene startinsert "), + dashboard.button("f", "  Find file", ":Telescope find_files"), + dashboard.button("r", "  Recent", ":Telescope oldfiles"), + dashboard.button("s", "  Settings", ":e ~/.config/nvim | :cd %:p:h"), + dashboard.button("q", "  Quit nvim", ":qa"), + } + + alpha.setup(dashboard.opts) + end, +} diff --git a/lua/plugins/ui/startup.lua b/lua/plugins/ui/startup.lua deleted file mode 100644 index d89f082..0000000 --- a/lua/plugins/ui/startup.lua +++ /dev/null @@ -1,14 +0,0 @@ -return { - "startup-nvim/startup.nvim", - dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" }, - config = function() - require("startup").setup({ theme = "Dashboard" }) - -- vim.g.startup_bookmarks = { - -- ["N"] = "~/.config/nvim", - -- ["K"] = "~/.config/kitty/kitty.conf", - -- ["S"] = "~/.skhdrc", - -- ["Z"] = "~/.zshrc", - -- ["Y"] = "~/.yabairc", - -- } - end, -}