A simplified version of vim-devicons which does NOT provide any 3rd party integrations in itself. In otherwords, it is a fundemental plugin to handle Nerd Fonts from Vim.
With fern.vim + fern-renderer-nerdfont.vim. All glyphs above were powered by this plugin
First of all, make sure one of Nerd Fonts is used in your Vim.
After that, use nerdfont#find()
function to find a glyph for the current filetype like:
echo nerdfont#find()
ξ
Or specify a path to find a glyph for a particular path like:
echo nerdfont#find(expand('~/.vimrc'))
ξ«
echo nerdfont#find(expand('~/.vim'))
ξ
Above automatically check if the specified path is directory. To avoid that, specify the second argument to tell if the path is directory or not like:
echo nerdfont#find(expand('~/.vimrc'), 0)
ξ«
echo nerdfont#find(expand('~/.vimrc'), 1)
ξ
See :help nerdfont-function
to find glyphs for directory, fileformat, platform, etc.
If you would like to add new glyph/filetype supports, see the following files
If | Where |
---|---|
Want to add new extension (e.g. .js ) |
assets/json/extension.json |
Want to add new exact name (e.g. Makefile ) |
assets/json/basename.json |
Want to add new complex pattern (e.g. .*/bin/.*$ ) |
assets/json/pattern.json |
Name | Description |
---|---|
glyph-palette.vim | An universal palette for glyphs to highlight nicely |
fern-renderer-nerdfont.vim | A fern.vim plugin which use nerdfont.vim to provide fancy glyphs |
The glyph mappings has copied from vim-devicons thus the part follow the license of vim-devicons (LICENSE.vim-devicons). Other parts are MIT license explained in LICENSE.