Skip to main content

Overview

Alpha provides a customizable dashboard that displays when you launch Neovim. This configuration creates a welcoming startup screen with quick access to common actions. Plugin: alpha-nvim Config File: lua/user/alpha.lua

Features

  • Custom ASCII art header
  • Quick action buttons
  • Custom footer text
  • Automatic theme loading

Configuration

Dashboard Header

The configuration displays a custom Neovim ASCII art logo:
dashboard.section.header.val = {
  [[                               __                ]],
  [[  ___     ___    ___   __  __ /\_\    ___ ___    ]],
  [[ / _ `\  / __`\ / __`\/\ \/\ \\/\ \  / __` __`\  ]],
  [[/\ \/\ \/\  __//\ \_\ \ \ \_/ |\ \ \/\ \/\ \/\ \ ]],
  [[\ \_\ \_\ \____\ \____/\ \___/  \ \_\ \_\ \_\ \_\]],
  [[ \/_/\/_/\/____/\/___/  \/__/    \/_/\/_/\/_/\/_/]],
}

Quick Action Buttons

The dashboard includes seven convenient shortcuts:
KeyIconActionDescription
f๐Ÿ“Find fileOpens Telescope file finder
e๐Ÿ“„New fileCreates a new empty buffer
p๐Ÿ“‚Find projectOpens Telescope projects
r๐Ÿ•Recently used filesShows recent files
t๐Ÿ”Find textOpens live grep search
cโš™๏ธConfigurationOpens init.lua
qโŒQuit NeovimExits Neovim
dashboard.section.buttons.val = {
  dashboard.button("f", "  Find file", ":Telescope find_files <CR>"),
  dashboard.button("e", "  New file", ":ene <BAR> startinsert <CR>"),
  dashboard.button("p", "  Find project", ":Telescope projects <CR>"),
  dashboard.button("r", "  Recently used files", ":Telescope oldfiles <CR>"),
  dashboard.button("t", "๓ฑŽธ  Find text", ":Telescope live_grep <CR>"),
  dashboard.button("c", "  Configuration", ":e $MYVIMRC <CR>"),
  dashboard.button("q", "  Quit Neovim", ":qa<CR>"),
}
The footer displays a custom message (default: โ€œchrisatmachine.comโ€):
local function footer()
  return "chrisatmachine.com"
end

dashboard.section.footer.val = footer()
The configuration includes commented code for displaying fortune quotes. Uncomment this section if you have fortune-mod installed on your system.

Highlight Groups

The dashboard uses custom highlight groups for styling:
dashboard.section.footer.opts.hl = "Type"
dashboard.section.header.opts.hl = "Include"
dashboard.section.buttons.opts.hl = "Keyword"

Customization

Change the Header

Replace the ASCII art with your own design:
dashboard.section.header.val = {
  [[ YOUR CUSTOM ]],
  [[ ASCII ART   ]],
  [[ HERE        ]],
}

Add Custom Buttons

Add new quick actions:
dashboard.section.buttons.val = {
  -- ... existing buttons ...
  dashboard.button("s", "  Settings", ":e ~/.config/nvim/lua/user/options.lua <CR>"),
}

Enable Fortune Quotes

Uncomment the fortune function for random quotes:
local function footer()
  local handle = io.popen("fortune")
  local fortune = handle:read("*a")
  handle:close()
  return fortune
end

Manual Trigger

Open the Alpha dashboard manually:
:Alpha
Or use the which-key binding:
<leader>a
  • Which-Key - Provides <leader>a shortcut
  • Telescope - Powers the file and text search buttons

Build docs developers (and LLMs) love