Open isabelgk opened 6 years ago
I get the same thing in NeoVim, but it works as advertised in Vim and GVim.
I get the same error that @isabelgk . Somebody have any clue about the issue?
I figured it out! I just inserted syntax on
in my .vimrc
file and the colors started to display normally. I'm using ITerm
with zshell
Yeah, I have the same problem on neovim on Iterm
I used to have a similar problem where the syntax highlight works for the file/folder names, but not for the icons (pink icons for both directories and any type of files). After digging into the problem for hours, I finally figured out how to solve the problem (sort of).
Please refer to https://github.com/ryanoasis/vim-devicons/issues/250#issuecomment-503616655 for the solution. Since I am using NeoVim, I created $HOME/.config/nvim/after/syntax/nerdtree.vim
file and added line syntax clear NERDTreeFlags
. After restarting the nvim, the devicons are now properly highlighted.
However, now I am having ugly brackets around the devicons. ☹️
Hope this helps.
Supplementing @ryanbyon workaround, you can add this command to your .vimrc
augroup nerdtree
autocmd!
autocmd FileType nerdtree syntax clear NERDTreeFlags
" other nerdtree related aucomds
augroup END
@ryanbyon's approach gave me the same result with squarebrackets.
When I try to add @aborzunov's command to my .vimrc it gives the following error
Error detected while processing FileType Autocommands for "nerdtree":
E28: No such highlight group name: NERDTreeFlags
Im also using NeoVim.
In the previously mentioned threat from vim-devicons, there's a solution proposed but this wont work for me neither, maybe because I use NeoVim and not Vim or GVim.
@ryanbyon's method also gave me the square brackets (Im also using nvim) but they are not misaligned see below:
Maybe its an issue with your term? try using nvim-qt. On the flip side using @aborzunov's method yielded no results at all! As stated above! I was however able to write my own solution. @timoleistner try autocmd Syntax nerdtree syntax clear NERDTreeFlags
after syntax on
in your vimrc.
Here are some screenshots of the output of this:
@allbombson, @ryanbyon, @timoleistner update nerdtree, vim-devicons and vim-nerdtree-syntax-highlight to the latest version, undo any syntax clear NERDTreeFlags that you have added anywhere and try again, and check if it works now.
Adding this removed the ugly bracket for me, let g:webdevicons_conceal_nerdtree_brackets = o @ryanbyon
I'm having the same problem. My colors are good but these ugly brackets...
I tried the above solutions including syntax clear NERDTreeFlags
but they did not help.
syntax enable
...
Plug 'ryanoasis/vim-devicons'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'preservim/nerdtree'
syntax clear NERDTreeFlags
...
Any suggestions/ideas?
@alexsmartens have you tried what I mentioned before? Updating vim-devicon, nerdtree and vim-nerdtree-syntax-highlight to the latest versions? You can do that by finding the repo folders on your disk and running "git pull". If you are using Neovim on ubuntu, that would be "~/.config/nvim/bundle/syntax clear NERDTreeFlags
line from your .vimrc and try again.
oh my, thanks @tiagofumo. That solved the problem!
I thought I'm on the latest versions coz I just installed the plugins. There were a couple of updates to vim-devicon
and the other ones were up-to-date.
An interesting thing, the vim that I'm using is a "brew" vim. I installed it as an attempt to solve this problem. After solving the bracket issue with @tiagofumo's suggestion I uninstalled "brew" vim and immediately started seeing the ugly brackets again.
So, I guess something is still off when using the default vim with vim-devicons
. At the same time, the "brew" installation of vim plays nice with the brackets although both versions of vim are 8.2.3350 in my case.
I installed the plugin using Vundle by adding
Plugin 'tiagofumo/vim-nerdtree-syntax-highlight'
in my .vimrc. It successfully installed. I also made sure I had the the devicons font installed.When I open NERDTree, I see:
I tried adding in specified colors to see if anything would change, but no luck.
Any idea what I can try?