ryanoasis / vim-devicons

Adds file type icons to Vim plugins such as: NERDTree, vim-airline, CtrlP, unite, Denite, lightline, vim-startify and many more
MIT License
5.66k stars 267 forks source link

NERDTree needs to be called after vim-devicons #428

Open harriott opened 2 years ago

harriott commented 2 years ago

Requirements

Required Info

Optional Info

my issue

I can only see icons if packadd nerdtree is after packadd vim-devicons (not before, as recommended). I've checked with vim dotfiles stripped down to only those packages and the calls to them, nothing else.

timsu92 commented 2 years ago

I'm fine on Vim 8.1 and loading NERDTree first. I use vim-plug. Maybe you can try if that's a problem of your plugin manager or Vim?

Here's what in my .vimrc:

Plug 'preservim/nerdtree' | 
    \ Plug 'Xuyuanp/nerdtree-git-plugin' |
    \ Plug 'ryanoasis/vim-devicons'
harriott commented 2 years ago

vim 9.0 patches 1-354 here now, so tried again here the recommended loading order:

.vim/after/plugin/plugins.vim

packadd nerdtree
packadd vim-devicons

and NERDTree again doesn't find the vim-devicons...

fourpastmidnight commented 1 year ago

This is probably related to this issue for Vim's package system.

harriott commented 1 year ago

So I checked again, with no other packages, scriptnames ends with calls only to NERD_tree.vim & webdevicons.vim:

- either your recommended order (and devicons are invisible in NERDtree):

...
 1: /etc/vimrc
 2: /usr/share/vim/vimfiles/archlinux.vim
 3: ~/.vimrc
...
43: ~/.vim/pack/packs-cp/opt/nerdtree/plugin/NERD_tree.vim
44: ~/.vim/pack/packs-cp/opt/nerdtree/autoload/nerdtree.vim
...
63: ~/.vim/pack/packs-cp/opt/vim-devicons/plugin/webdevicons.vim

- or my order (and devicons are visible in NERDtree):

...
43: ~/.vim/pack/packs-cp/opt/vim-devicons/plugin/webdevicons.vim
44: ~/.vim/pack/packs-cp/opt/nerdtree/plugin/NERD_tree.vim
45: ~/.vim/pack/packs-cp/opt/nerdtree/autoload/nerdtree.vim
...

Nothing odd in the loading orders, so I don't think it's related to Inconsistent loading order of packages and their parts #7056.