get the nerdfont icons inside neovim . no need open nerdfont website to search icons anymore.
- lazy.nvim
require('lazy').setup({
{'glepnir/nerdicons.nvim', cmd = 'NerdIcons', config = function() require('nerdicons').setup({}) end}
})
- packer
use({'glepnir/nerdicons.nvim', cmd = 'NerdIcons', config = function() require('nerdicons').setup({}) end})
available options in setup params table
{
border = 'single', -- Border
prompt = ' ', -- Prompt Icon
preview_prompt = ' ', -- Preview Prompt Icon
width = 0.5 -- flaot window width
down = '<C-n>', -- Move down in preview
up = '<C-p>', -- Move up in preview
copy = '<C-y>', -- Copy to the clipboard
}
close the nerdicons window in prompt buffer you can exit to normal mode then press <Esc>
or
Ctrl-c
- call the command
NerdIcons
or with an argument likeNerdIcons linux
- input the keyword of icon name
Ctrl n
orCtrl p
to move in previewCtrl y
to copy the icon
all the highlight groups
NerdIconPrompt NerdIconPreviewPrompt NerdIconNormal NerdIconBorder