Dashboard-nvim
info
You can enable the extra with the :LazyExtras
command.
Plugins marked as optional will only be configured if they are installed.
Alternatively, you can add it to your lazy.nvim
imports
lua/config/lazy.lua
require("lazy").setup({
spec = {
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
{ import = "lazyvim.plugins.extras.ui.dashboard-nvim" },
{ import = "plugins" },
},
})
Below you can find a list of included plugins and their default settings.
caution
You don't need to copy the default settings to your config. They are only shown here for reference.
snacks.nvimâ
- Options
- Full Spec
opts = { dashboard = { enabled = false } }
{ "folke/snacks.nvim", opts = { dashboard = { enabled = false } } }
dashboard-nvimâ
- Options
- Full Spec
opts = function()
local logo = [[
âââ ââââââ âââââââââââ ââââââ ââââââââââ ââââ Z
âââ ââââââââââââââââââââ âââââââ âââââââââââ âââââ Z
âââ ââââââââ âââââ âââââââ âââ âââââââââââââââââ z
âââ ââââââââ âââââ âââââ ââââ ââââââââââââââââââ z
âââââââââââ âââââââââââ âââ âââââââ ââââââ âââ âââ
âââââââââââ âââââââââââ âââ âââââ ââââââ âââ
]]
logo = string.rep("\n", 8) .. logo .. "\n\n"
local opts = {
theme = "doom",
hide = {
-- this is taken care of by lualine
-- enabling this messes up the actual laststatus setting after loading a file
statusline = false,
},
config = {
header = vim.split(logo, "\n"),
-- stylua: ignore
center = {
{ action = 'lua LazyVim.pick()()', desc = " Find File", icon = "ï ", key = "f" },
{ action = "ene | startinsert", desc = " New File", icon = "ï
", key = "n" },
{ action = 'lua LazyVim.pick("oldfiles")()', desc = " Recent Files", icon = "ï
", key = "r" },
{ action = 'lua LazyVim.pick("live_grep")()', desc = " Find Text", icon = "ïą ", key = "g" },
{ action = 'lua LazyVim.pick.config_files()()', desc = " Config", icon = "ïŁ ", key = "c" },
{ action = 'lua require("persistence").load()', desc = " Restore Session", icon = "î ", key = "s" },
{ action = "LazyExtras", desc = " Lazy Extras", icon = "îȘ ", key = "x" },
{ action = "Lazy", desc = " Lazy", icon = "ó°Č ", key = "l" },
{ action = function() vim.api.nvim_input("<cmd>qa<cr>") end, desc = " Quit", icon = "ïŠ ", key = "q" },
},
footer = function()
local stats = require("lazy").stats()
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
return { "⥠Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" }
end,
},
}
for _, button in ipairs(opts.config.center) do
button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
button.key_format = " %s"
end
-- open dashboard after closing lazy
if vim.o.filetype == "lazy" then
vim.api.nvim_create_autocmd("WinClosed", {
pattern = tostring(vim.api.nvim_get_current_win()),
once = true,
callback = function()
vim.schedule(function()
vim.api.nvim_exec_autocmds("UIEnter", { group = "dashboard" })
end)
end,
})
end
return opts
end
{
"nvimdev/dashboard-nvim",
lazy = false, -- As https://github.com/nvimdev/dashboard-nvim/pull/450, dashboard-nvim shouldn't be lazy-loaded to properly handle stdin.
opts = function()
local logo = [[
âââ ââââââ âââââââââââ ââââââ ââââââââââ ââââ Z
âââ ââââââââââââââââââââ âââââââ âââââââââââ âââââ Z
âââ ââââââââ âââââ âââââââ âââ âââââââââââââââââ z
âââ ââââââââ âââââ âââââ ââââ ââââââââââââââââââ z
âââââââââââ âââââââââââ âââ âââââââ ââââââ âââ âââ
âââââââââââ âââââââââââ âââ âââââ ââââââ âââ
]]
logo = string.rep("\n", 8) .. logo .. "\n\n"
local opts = {
theme = "doom",
hide = {
-- this is taken care of by lualine
-- enabling this messes up the actual laststatus setting after loading a file
statusline = false,
},
config = {
header = vim.split(logo, "\n"),
-- stylua: ignore
center = {
{ action = 'lua LazyVim.pick()()', desc = " Find File", icon = "ï ", key = "f" },
{ action = "ene | startinsert", desc = " New File", icon = "ï
", key = "n" },
{ action = 'lua LazyVim.pick("oldfiles")()', desc = " Recent Files", icon = "ï
", key = "r" },
{ action = 'lua LazyVim.pick("live_grep")()', desc = " Find Text", icon = "ïą ", key = "g" },
{ action = 'lua LazyVim.pick.config_files()()', desc = " Config", icon = "ïŁ ", key = "c" },
{ action = 'lua require("persistence").load()', desc = " Restore Session", icon = "î ", key = "s" },
{ action = "LazyExtras", desc = " Lazy Extras", icon = "îȘ ", key = "x" },
{ action = "Lazy", desc = " Lazy", icon = "ó°Č ", key = "l" },
{ action = function() vim.api.nvim_input("<cmd>qa<cr>") end, desc = " Quit", icon = "ïŠ ", key = "q" },
},
footer = function()
local stats = require("lazy").stats()
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
return { "⥠Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" }
end,
},
}
for _, button in ipairs(opts.config.center) do
button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
button.key_format = " %s"
end
-- open dashboard after closing lazy
if vim.o.filetype == "lazy" then
vim.api.nvim_create_autocmd("WinClosed", {
pattern = tostring(vim.api.nvim_get_current_win()),
once = true,
callback = function()
vim.schedule(function()
vim.api.nvim_exec_autocmds("UIEnter", { group = "dashboard" })
end)
end,
})
end
return opts
end,
}