nvim-tree / nvim-web-devicons

lua `fork` of vim-web-devicons for neovim
MIT License
1.98k stars 183 forks source link

^M line terminations #255

Closed feliperyan closed 1 year ago

feliperyan commented 1 year ago

it seems like https://github.com/nvim-tree/nvim-web-devicons/blob/master/plugin/nvim-web-devicons.vim has ^M line termination causing neovim to raise an error.

Good'ol dos2unix fixed the issue for me.

alex-courtis commented 1 year ago

I'm not seeing any \r:

od -c nvim-web-devicons.vim
0000000   i   f       e   x   i   s   t   s   (   '   g   :   l   o   a
0000020   d   e   d   _   d   e   v   i   c   o   n   s   '   )       |
0000040       f   i   n   i   s   h       |       e   n   d   i   f  \n
0000060  \n   l   e   t       s   :   s   a   v   e   _   c   p   o
0000100   =       &   c   p   o  \n   s   e   t       c   p   o   &   v
0000120   i   m  \n  \n   "       T   O   D   O       c   h   a   n   g
0000140   e       s   o       i   t   s       e   a   s   i   e   r
0000160   t   o       g   e   t  \n   l   e   t       g   :   n   v   i
0000200   m   _   w   e   b   _   d   e   v   i   c   o   n   s       =
0000220       1  \n  \n   l   e   t       &   c   p   o       =       s
0000240   :   s   a   v   e   _   c   p   o  \n   u   n   l   e   t
0000260   s   :   s   a   v   e   _   c   p   o  \n  \n   l   e   t
0000300   g   :   l   o   a   d   e   d   _   d   e   v   i   c   o   n
0000320   s       =       1  \n

How are you installing the plugin? Do you see this if you clone the repo?

feliperyan commented 1 year ago

My apologies, I soon encountered another example of the same error somewhere else and it seems to be related to WSL2 and Github. Setting git config --global core.autocrlf = false seems to have resolved it for now