A simple, fast, and customizable boot screen for Neovim
There is only one reason for why boot.nvim was created
It was made to prettify Neovim, by adding a boot screen when Neovim starts up. Compare to other startup plugins for Neovim, boot.nvim has very few features. Other startup plugins may include bookmarks or keybindings but boot.nvim has none, as the purpose for this plugin is strictly cosmetics. This makes for very little plugin overhead, while still making your Neovim just that little bit nicer.
-
Small and Fast
-
Fully Customizable
-
Easy to Use
-
Modular Themes
Install boot.nvim with a package manager of your choice.
{
'piperinnshall/boot.nvim',
opts = {
-- add options here
},
}
use {
'piperinnshall/boot.nvim',
config = function()
require('boot').setup()
end
}
The default options for boot.nvim are:
require('boot').setup({
directory = 'boot.themes', -- choose the directory that the theme is located in
theme = { -- define options for a theme
-- set the name of the currently used theme
-- has to be the first element of the theme table
'neovim',
-- an array of theme content
content = {
-- a theme is an array of content tables
-- each table has its own settings and ascii table
{
ascii = {}, -- Should be an array of strings
color = 'ffffff', -- Color as string
vertical_padding = 0, -- Number for padding
alignment = 'center', -- One of 'left', 'right', 'center'
},
},
},
})
currently there are two native themes:
- neovim (default)
- melody
You can choose themes like this:
require('boot').setup({ theme = { 'neovim' } })
Custom themes are located by default in lua/boot/themes/my-custom-theme.lua
. Using the directory flag you can store themes in different locations.
For example, setting directory = 'config'
means that themes will be located in lua/config/my-custom-theme.lua
.
Warning:
Changing the directory flag will make all default themes unusable.
To use them again ensure the directory flag is deleted from configuration or set the directory flag to directory = 'boot.themes'
Themes are an array of content tables that contain information that will be drawn onto the screen. Each content table has its own properties.
To better understand how a theme is structured, here is the contents of the default theme 'neovim'
:
-- Content Table 1
{
ascii = {
' ███╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗ ',
' ████╗ ██║ ██╔════╝██╔═══██╗ ██║ ██║ ██║ ████╗ ████║ ',
' ██╔██╗ ██║ █████╗ ██║ ██║ ██║ ██║ ██║ ██╔████╔██║ ',
' ██║╚██╗██║ ██╔══╝ ██║ ██║ ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║ ',
' ██║ ╚████║ ███████╗╚██████╔╝ ╚████╔╝ ██║ ██║ ╚═╝ ██║ ',
' ╚═╝ ╚═══╝ ╚══════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝ ',
},
-- The above ascii table will be displayed in the current neovim buffer in this color
-- To set multiple colors, create new content tables
color = 'cba6f7',
-- The ascii art will be displayed in the center of the buffer
alignment = 'center',
-- The ascii art will be displayed 10 lines below the top of the buffer
vertical_padding = 10,
},
-- Content Table 2
{
ascii = {
'>> emacs',
},
color = '4c4f69',
alignment = 'center',
vertical_padding = 0,
},
You can create a custom theme in several ways:
return {
{
ascii = {},
color = 'ffffff',
vertical_padding = 0,
alignment = 'center',
},
}
require('boot').setup({
theme = {
'my-custom-theme'
content = {
{
ascii = {},
color = 'ffffff',
vertical_padding = 0,
alignment = 'center',
},
},
},
})
If content or content options are present in the plugin configuration, the set theme will not be used.
Apache License Version 2.0 January 2004