Skip to content

Instantly share code, notes, and snippets.

@VonHeikemen
Last active March 22, 2026 02:44
Show Gist options
  • Select an option

  • Save VonHeikemen/981cbe84bbcf0b7dc8eaab979dabee24 to your computer and use it in GitHub Desktop.

Select an option

Save VonHeikemen/981cbe84bbcf0b7dc8eaab979dabee24 to your computer and use it in GitHub Desktop.
Recreate Neovim's v0.12 intro message in Snack.nvim's dashboard.
---
-- Recreating Neovim's v0.12 intro message in Snacks.nvim's dashboard.
-- Based on echasnovski's fancy intro:
-- https://github.com/neovim/neovim/pull/38378
---
local Snacks = require('snacks')
local version = vim.version()
local fmt = function(str)
return {align = 'center', text = table.concat(str, '\n')}
end
local fmt_cmd = function(cmd, desc)
return {
align = 'left',
text = {
{'type '},
{cmd, hl = 'Identifier'},
{'<Enter>', hl = 'Special'},
{desc}
},
}
end
local fmt_logo = function(s1, s2)
return {
align = 'center',
text = {
{s1, hl = 'Special'},
{s2, hl = 'String'}
}
}
end
local sep = function()
local str = '────────────────────────────────────────────'
return {align = 'center', text = {str, hl = 'NonText'}}
end
local version_str = string.format(
'NVIM v%s.%s.%s',
version.major,
version.minor,
version.patch
)
if version.api_prerelease then
version_str = string.format('%s-dev+%s', version_str, version.build)
end
local dashboard = {
{
fmt_logo('','╲ ││'),
fmt_logo('││','╲╲││'),
fmt_logo('││',' ╲ │'),
{align = 'center', text = ''},
{align = 'center', text = {version_str, hl = 'String'}},
},
{
sep(),
fmt({
'Nvim is open source and freely distributable',
'https://neovim.io/#chat',
}),
sep(),
},
{
fmt_cmd(':help nvim', ' if you are new!'),
fmt_cmd(':checkhealth', ' to optimize Nvim'),
fmt_cmd(':q', ' to exit'),
fmt_cmd(':help', ' for help'),
sep(),
fmt_cmd(':help news', ' for changelog'),
},
{
sep(),
fmt({'Help poor children in Uganda!'}),
fmt_cmd(':help Kuwasha', ' for information')
}
}
Snacks.setup({
dashboard = {
enabled = true,
width = 44,
sections = dashboard,
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment