1

I am configuring vim-devicons for my neovim and this is my init.nvim:

:set number
:set autoindent
:set tabstop=4
:set shiftwidth=4
:set smarttab
:set softtabstop=4
:set mouse=a

call plug#begin()
Plug 'https://github.com/preservim/nerdtree' " NerdTree
Plug 'https://github.com/rafi/awesome-vim-colorschemes' " Retro Scheme
Plug 'https://github.com/ryanoasis/vim-devicons' " Developer Icons
call plug#end()

set encoding=UTF-8

:colorscheme molokayo

"let g:NERDTreeDirArrowExpandable="+"
"let g:NERDTreeDirArrowCollapsible="~"

but devicons are not rendered on my terminal at all (for hyper, gnome-terminal, terminator):

enter image description here

enter image description here

enter image description here

The font I use here is Fira Code but it doesn't work for Cascadia either.

I have also tried the FAQ routine from vim-devicons:

  1. :echo loaded_webdevicons returns 1
  2. :echo g:webdevicons_enable returns 1
  3. :echo g:webdevicons_enable_nerdtree returns 1
  4. :echo g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol gives me an wrongly rendered symbol.

Now how do I fix it the get devicons working?

1

1 Answer 1

0

You have to:

  • Download and install the corresponding font from: patched-fonts for your platform
  • Tell Neovim to use installed nerd font (e.g.: :set guifont=FiraCode\ Nerd\ Font\ Mono:h9:cANSI)
  • Install and use the devicons plugin (Plug 'ryanoasis/vim-devicons' with vim-plug)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.