Git Product home page Git Product logo

vim-nerdfont's Introduction

๐Ÿ‘“ nerdfont.vim

Support Vim 8.1 or above Support Neovim 0.4 or above MIT License Doc

reviewdog vim neovim

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

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:

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.

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
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

Integrations

See Integration section of Wiki.

License

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.

vim-nerdfont's People

Contributors

aspulse avatar creativenull avatar freed-wu avatar hashitaku avatar ksaito422 avatar lambdalisue avatar leafoftree avatar raa0121 avatar sevenc-nanashi avatar watcol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

vim-nerdfont's Issues

Vue icon is broken

image

Hey. Vue icon is broken. However it works in airline.

vim
st-terminal
freebsd

a2ac4d9 breaks existing cellwidth settings

After a2ac4d9 , nerdfont.vim breaks cellwidth setting by setcellwidth() called elsewhere.
Because of setcellwidth() behavior that overwrites existing settings.
sample script is here.

set ambiwidth=single

" โ— โ†’ 0x25cf

call setcellwidths([[0x25cf, 0x25cf, 2]])

" โ— is displayed double width.

call nerdfont#cellwidths#fix()

" โ— is now displayed sigle width.

thanks.

Add more icons?

How about

index d51c479..c773c6d 100644
--- a/autoload/nerdfont/path/basename.vim
+++ b/autoload/nerdfont/path/basename.vim
@@ -14,6 +14,7 @@ let g:nerdfont#path#basename#defaults = {
       \ '_gvimrc'                          : '๎˜ซ',
       \ '_vimrc'                           : '๎˜ซ',
       \ 'cmakelists.txt'                   : '๎˜•',
+      \ 'requirements.txt'                 : '๎˜•',
       \ 'config.ru'                        : '๎ž‘',
       \ 'docker-compose.yml'               : '๎žฐ',
       \ 'dockerfile'                       : '๎žฐ',
diff --git a/autoload/nerdfont/path/extension.vim b/autoload/nerdfont/path/extension.vim
index 1afbf5a..c2b445e 100644
--- a/autoload/nerdfont/path/extension.vim
+++ b/autoload/nerdfont/path/extension.vim
@@ -10,6 +10,7 @@ let g:nerdfont#path#extension#defaults = {
       \ 'c'        : '๎˜ž',
       \ 'c++'      : '๎˜',
       \ 'cc'       : '๎˜',
+      \ 'cu'       : '๎˜',
       \ 'clj'      : '๎จ',
       \ 'cljc'     : '๎จ',
       \ 'cljs'     : '๎ช',
@@ -44,6 +45,7 @@ let g:nerdfont#path#extension#defaults = {
       \ 'gif'      : '๎˜',
       \ 'go'       : '๎˜ง',
       \ 'h'        : '๏ƒฝ',
+      \ 'cuh'      : '๏ƒฝ',
       \ 'haml'     : '๎˜Ž',
       \ 'hbs'      : '๎˜',
       \ 'hh'       : '๏ƒฝ',

requirements.txt is the configuration of python, and cu and cuh are cuda's c source file and header file.

I found a reference: https://github.com/Peltoche/lsd/blob/master/src/icon.rs#L102 or https://github.com/ogham/exa/blob/master/src/output/icons.rs. Maybe we can do more?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.