pokemon.nvim
is a Neovim
library that displays a Pokemon
(text art) on the startup screen header.
Furthermore, you can use the Pokedex
feature to access information about the current Pokemon.
- lazy.nvim
{
'goolord/alpha-nvim',
event = 'VimEnter',
config = function()
local alpha = require('alpha')
local dashboard = require('alpha.themes.dashboard')
local pokemon = require('pokemon')
pokemon.setup({
number = 'random',
size = 'auto',
})
dashboard.section.header.val = pokemon.header()
alpha.setup(dashboard.config)
end,
dependencies = { { 'nvim-tree/nvim-web-devicons', 'ColaMint/pokemon.nvim' } }
}
- lazy.nvim
{
'glepnir/dashboard-nvim',
event = 'VimEnter',
config = function()
local dashboard = require('dashboard')
local pokemon = require('pokemon')
pokemon.setup({
number = 'random',
size = 'auto',
})
dashboard.setup {
config = {
header = pokemon.header()
}
}
end,
dependencies = { { 'nvim-tree/nvim-web-devicons', 'ColaMint/pokemon.nvim' } }
}
- lazy.nvim
{
'mhinz/vim-startify',
event = 'VimEnter',
config = function()
local pokemon = require('pokemon')
pokemon.setup({
number = 'random',
size = 'auto',
})
vim.g.startify_custom_header = pokemon.header()
end,
dependencies = { { 'ColaMint/pokemon.nvim' } }
}
{
-- pokemon number (format: [number]{.[forme]}). default is 'random'.
-- [number]: 0001 ~ 1008
-- [forme]: 1, 2, 3, 4, ... (represents the different forme of this pokemon)
number = 'random', -- '0001', '0006.1', '0006.2', '0006.3'
-- header size ('tiny', small', 'large'). default is 'auto'.
size = 'auto',
}
Toggle the floating window of Pokedex
.
recommended keymap:
vim.api.nvim_set_keymap(
'n',
'<F2>',
'<cmd>PokemonTogglePokedex<cr>',
{
noremap = true,
desc = 'PokemonTogglePokedex',
}
)