Skip to main content

Overview

Alpha provides a customizable dashboard/greeter that appears when you start Neovim without opening a file. It displays a stylized header and quick action buttons for common tasks. Plugin: goolord/alpha-nvim

Features

  • Custom ASCII art header displaying “NEOVIM”
  • Quick access buttons for common operations
  • Fast startup with lazy loading on VimEnter event
  • Disables folding for a clean appearance

Configuration

The Alpha dashboard is configured in lua/magictt/plugins/alpha.lua:
return {
  "goolord/alpha-nvim",
  event = "VimEnter",
  config = function()
    local alpha = require("alpha")
    local dashboard = require("alpha.themes.dashboard")

    -- Set header
    dashboard.section.header.val = {
      "                                                     ",
      "  ███╗   ██╗███████╗ ██████╗ ██╗   ██╗██╗███╗   ███╗ ",
      "  ████╗  ██║██╔════╝██╔═══██╗██║   ██║██║████╗ ████║ ",
      "  ██╔██╗ ██║█████╗  ██║   ██║██║   ██║██║██╔████╔██║ ",
      "  ██║╚██╗██║██╔══╝  ██║   ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ",
      "  ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ",
      "  ╚═╝  ╚═══╝╚══════╝ ╚═════╝   ╚═══╝  ╚═╝╚═╝     ╚═╝ ",
      "                                                     ",
    }

    -- Set menu buttons
    dashboard.section.buttons.val = {
      dashboard.button("e", "  > New File", "<cmd>ene<CR>"),
      dashboard.button("SPC ee", "  > Toggle file explorer", "<cmd>NvimTreeToggle<CR>"),
      dashboard.button("SPC ff", "󰱼 > Find File", "<cmd>Telescope find_files<CR>"),
      dashboard.button("SPC fs", "  > Find Word", "<cmd>Telescope live_grep<CR>"),
      dashboard.button("SPC wr", "󰁯  > Restore Session For Current Directory", "<cmd>AutoSession restore<CR>"),
      dashboard.button("q", " > Quit NVIM", "<cmd>qa<CR>"),
    }

    alpha.setup(dashboard.opts)

    -- Disable folding on alpha buffer
    vim.cmd([[autocmd FileType alpha setlocal nofoldenable]])
  end,
}

Dashboard Actions

When you see the Alpha dashboard, you can press the following keys:
KeyActionDescription
eNew FileCreate a new empty buffer
Space eeFile ExplorerOpen NvimTree file explorer
Space ffFind FileOpen Telescope file finder
Space fsFind WordSearch for text across files
Space wrRestore SessionRestore previous session for current directory
qQuitExit Neovim

Usage

The Alpha dashboard appears automatically when you:
  • Start Neovim without any file arguments: nvim
  • Close all buffers in an active Neovim session
You can manually trigger the dashboard by running:
:Alpha

Customization Tips

Change the Header

Modify the dashboard.section.header.val array in alpha.lua to use your own ASCII art. You can generate ASCII art using tools like:

Add Custom Buttons

Add new buttons to the dashboard:
dashboard.button("key", "icon > Description", "<cmd>Command<CR>")
Example:
dashboard.button("SPC fg", "  > Find Git Files", "<cmd>Telescope git_files<CR>")

Hide the Dashboard

If you prefer to start with an empty buffer, you can disable the plugin by removing or commenting out the Alpha configuration in your plugins directory.
  • Telescope - Fuzzy finder integrated with dashboard
  • NvimTree - File explorer accessible from dashboard

Troubleshooting

Dashboard doesn’t appear on startup
  • Ensure you’re starting Neovim without opening a file
  • Check that the plugin loaded correctly: :Lazy
Buttons not working
  • Verify the associated plugins (Telescope, NvimTree) are installed
  • Check for conflicting keymappings: :map <key>

Build docs developers (and LLMs) love