alpha-nvim.lua

~/.config/nvim/lua/plugins/alpha-nvim.lua
return {
  'goolord/alpha-nvim',
  dependencies = { 'echasnovski/mini.icons' },
  config = function()
    local dashboard = require("alpha.themes.dashboard")
    local logo = [[
██    ██ ███████  ██████ ████████  ██████  ██████  ███████ ██████   █████   ██████ ███████
██    ██ ██      ██         ██    ██    ██ ██   ██ ██      ██   ██ ██   ██ ██      ██
██    ██ █████   ██         ██    ██    ██ ██████  ███████ ██████  ███████ ██      █████
 ██  ██  ██      ██         ██    ██    ██ ██   ██      ██ ██      ██   ██ ██      ██
  ████   ███████  ██████    ██     ██████  ██   ██ ███████ ██      ██   ██  ██████ ███████
    ]]
    dashboard.section.header.val = vim.split(logo, "\n")
    dashboard.section.header.opts.hl = "Function"

    dashboard.section.buttons.val = {
      -- dashboard.button("f", " " .. " Find file",       "<cmd> lua LazyVim.pick()() <cr>"),
      -- dashboard.button("r", " " .. " Recent files",    [[<cmd> lua LazyVim.pick("oldfiles")() <cr>]]),
      -- dashboard.button("g", " " .. " Find text",       [[<cmd> lua LazyVim.pick("live_grep")() <cr>]]),
      -- dashboard.button("c", " " .. " Config",          "<cmd> lua LazyVim.pick.config_files()() <cr>"),
      dashboard.button("n", " " .. " New file", [[<cmd> ene <BAR> startinsert <cr>]]),
      dashboard.button("s", " " .. " Restore Session", [[<cmd> lua require("persistence").load() <cr>]]),
      dashboard.button("l", "󰒲 " .. " Lazy", "<cmd> Lazy <cr>"),
      -- dashboard.button("q", " " .. " Quit",            "<cmd> qa <cr>"),
    }

    require 'alpha'.setup(dashboard.config)
  end,
};

Comments