Do you like Nerd fonts? but don't like going over to their site to fetch a glyph for your pretty terminal? Well, me too!
Introducing nerdy.nvim, a super handy plugin that lets you search, preview and insert all nerd font glyphs straight from Neovim!
neovim
-- Lazy
{
'2kabhishek/nerdy.nvim',
dependencies = {
'folke/snacks.nvim',
},
cmd = 'Nerdy',
opts = {
max_recents = 30, -- Configure recent icons limit
add_default_keybindings = true, -- Add default keybindings
use_new_command = true, -- Enable new command system
}
},
Available Commands:
:Nerdy
- Browse all nerd font icons (default behavior):Nerdy list
- Browse all nerd font icons (explicit):Nerdy recents
- Browse recently used icons:Nerdy get <icon_name>
- Insert specific icon by name⚠️ DEPRECATION NOTICE: The following commands are deprecated and will be removed in a future version. Please migrate to the new
Nerdy
commands above. More information: https://github.com/2kabhishek/nerdy.nvim/pull/14
If you haven't updated your config yet, these commands still work but show deprecation warnings:
Nerdy
-> Nerdy
or Nerdy list
NerdyRecents
-> Nerdy recents
Migration: Add use_new_command = true
to your config to switch to the new unified interface:
By default, these are the configured keybindings.
Keybinding | Command | Description |
---|---|---|
<leader>in |
:Nerdy list<CR> or :Nerdy<CR> |
Browser nerd icons |
<leader>iN |
:Nerdy recents<CR> |
Browser recent nerd icons |
I recommend customizing these keybindings based on your preferences.
Use :help nerdy
for more details.
Nerdy also comes with a Telescope extension, to use it add the following to your telescope configs.
require('telescope').load_extension('nerdy')
And then call
:Telescope nerdy
:Telescope nerdy_recents
" or
:lua require('telescope').extensions.nerdy.nerdy()
:lua require('telescope').extensions.nerdy.nerdy_recents()
You can also get nerd font icons programmatically using the nerdy.get()
function:
local nerdy = require('nerdy')
-- Get a specific icon by name
local lua = nerdy.get('seti-lua') -- Returns ''
-- Handle cases where icon doesn't exist
local unknown_icon = nerdy.get('non-existent') -- Returns '' and shows warning
-- Use in your own functions
local function get_language_icon(language)
local icon_name = 'md-language_' .. language
return nerdy.get(icon_name)
end
Recent icons are not tracked when fetching icons programmatically.
*� This is useful when configuring Neovim status lines, file trees, or any plugin that needs consistent nerd font icons without hard coding unicode characters.
Running the python scripts/generator.py
command will automatically fetch new icons from source and update the icons.
I love nerd font glyphs, and I use them anywhere I can! but I was wasting a lot of time going back and forth between nerd font site and neovim, also the copy feature was super buggy for me on the site, so I made nerdy!
⭐ hit the star button if you found this useful ⭐
Source | Blog | Twitter | LinkedIn | More Links | Other Projects