https://github.com/lambdalisue/vim-nerdfont
👓 Fundemental plugin to handle Nerd Fonts in Vim
https://github.com/lambdalisue/vim-nerdfont
devicons neovim nerdfont vim
Last synced: 22 days ago
JSON representation
👓 Fundemental plugin to handle Nerd Fonts in Vim
- Host: GitHub
- URL: https://github.com/lambdalisue/vim-nerdfont
- Owner: lambdalisue
- License: mit
- Created: 2020-07-28T11:14:21.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-02-21T11:52:38.000Z (2 months ago)
- Last Synced: 2025-03-28T19:11:29.676Z (29 days ago)
- Topics: devicons, neovim, nerdfont, vim
- Language: Vim Script
- Homepage:
- Size: 113 KB
- Stars: 143
- Watchers: 5
- Forks: 17
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 👓 nerdfont.vim


[](LICENSE)
[](doc/nerdfont.txt)[](https://github.com/lambdalisue/nerdfont.vim/actions?query=workflow%3Areviewdog)
[](https://github.com/lambdalisue/vim-nerdfont/actions/workflows/vim.yml)
[](https://github.com/lambdalisue/vim-nerdfont/actions/workflows/neovim.yml)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.[vim-devicons]: https://github.com/ryanoasis/vim-devicons
[nerd fonts]: https://github.com/ryanoasis/nerd-fonts
_With fern.vim + fern-renderer-nerdfont.vim. All glyphs above were powered by this plugin_## Usage
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:```vim
echo nerdfont#find()

```Or specify a path to find a glyph for a particular path like:
```vim
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:```vim
echo nerdfont#find(expand('~/.vimrc'), 0)

echo nerdfont#find(expand('~/.vimrc'), 1)

```See `:help nerdfont-function` to find glyphs for directory, fileformat, platform, etc.
## Contribution
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`](./assets/json/extension.json) |
| Want to add new exact name (e.g. `Makefile`) | [`assets/json/basename.json`](./assets/json/basename.json) |
| Want to add new complex pattern (e.g. `.*/bin/.*$`) | [`assets/json/pattern.json`](./assets/json/pattern.json) |## Integrations
See [Integration section](https://github.com/lambdalisue/nerdfont.vim/wiki#integrations) of Wiki.
## License
The glyph mappings has copied from [vim-devicons][] thus the part follow the license of [vim-devicons][] ([LICENSE.vim-devicons](./LICENSE.vim-devicon)).
Other parts are MIT license explained in [LICENSE](./LICENSE).