From 474ca5896b1a7691f11056b8cf8bd6fd043886b2 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Wed, 12 Jan 2022 22:56:30 +0100 Subject: Add alpha --- lua/config/alpha.lua | 45 +++++++++++++++++++++++++++++++++++++++++++++ lua/config/init.lua | 1 + lua/plugins.lua | 1 + 3 files changed, 47 insertions(+) create mode 100644 lua/config/alpha.lua diff --git a/lua/config/alpha.lua b/lua/config/alpha.lua new file mode 100644 index 0000000..efbd6f6 --- /dev/null +++ b/lua/config/alpha.lua @@ -0,0 +1,45 @@ +-- A customizable greeter. + +local status_ok, alpha = pcall(require, "alpha") +if not status_ok then + return +end + +local dashboard = require("alpha.themes.dashboard") +dashboard.section.header.val = { + [[ ##############..... ############## ]], + [[ ##############......############## ]], + [[ ##########..........########## ]], + [[ ##########........########## ]], + [[ ##########.......########## ]], + [[ ##########.....##########.. ]], + [[ ##########....##########..... ]], + [[ ..##########..##########......... ]], + [[ ....##########.#########............. ]], + [[ ..################JJJ............ ]], + [[ ################............. ]], + [[ ##############.JJJ.JJJJJJJJJJ ]], + [[ ############...JJ...JJ..JJ JJ ]], + [[ ##########....JJ...JJ..JJ JJ ]], + [[ ########......JJJ..JJJ JJJ JJJ ]], + [[ ###### ......... ]], + [[ ..... ]], + [[ . ]], +} +dashboard.section.buttons.val = { + dashboard.button("f", " Find file", ":Telescope find_files "), + dashboard.button("e", " New file", ":ene startinsert "), + dashboard.button("p", " Find project", ":Telescope projects "), + dashboard.button("r", " Recently used files", ":Telescope oldfiles "), + dashboard.button("t", " Find text", ":Telescope live_grep "), + dashboard.button("c", " Configuration", ":e ~/.config/nvim/init.lua "), + dashboard.button("q", " Quit Neovim", ":qa"), +} + +dashboard.section.footer.opts.hl = "Type" +dashboard.section.header.opts.hl = "Include" +dashboard.section.buttons.opts.hl = "Keyword" + +dashboard.opts.opts.noautocmd = true +-- vim.cmd([[autocmd User AlphaReady echo 'ready']]) +alpha.setup(dashboard.opts) diff --git a/lua/config/init.lua b/lua/config/init.lua index 6f08ad3..ea3ff9f 100644 --- a/lua/config/init.lua +++ b/lua/config/init.lua @@ -13,3 +13,4 @@ require("config.bufferline") require("config.lualine") require("config.project") require("config.impatient") +require("config.alpha") diff --git a/lua/plugins.lua b/lua/plugins.lua index 46bfd5d..0a58c09 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -34,4 +34,5 @@ return { }, { "ahmedkhalf/project.nvim" }, { "lewis6991/impatient.nvim" }, + { "goolord/alpha-nvim" }, } -- cgit v1.2.3-70-g09d2