Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NERDTree icons all pink OR with square brackets if I change color. #439

Open
8 tasks done
ubaldot opened this issue Oct 6, 2022 · 1 comment
Open
8 tasks done

Comments

@ubaldot
Copy link

ubaldot commented Oct 6, 2022

Required Info

NERDTree icons are all pink OR with square brackets if I change color.

According to the documentation, I have added the following lines to my .vimrc


function! NERDTreeHighlightFile(extension, fg, bg, guifg, guibg)
exec 'autocmd FileType nerdtree highlight ' . a:extension .' ctermbg='. a:bg .' ctermfg='. a:fg .' guibg='. a:guibg .' guifg='. a:guifg
exec 'autocmd FileType nerdtree syn match ' . a:extension .' #^\s\+.*'. a:extension .'$#'
endfunction

au VimEnter * call NERDTreeHighlightFile('jade', 'green', 'none', 'green', '#151515')
au VimEnter * call NERDTreeHighlightFile('ini', 'yellow', 'none', 'yellow', '#151515')
au VimEnter * call NERDTreeHighlightFile('py', 'yellow', 'none', 'yellow', '#151515')
au VimEnter * call NERDTreeHighlightFile('md', 'blue', 'none', '#3366FF', '#151515') 
au VimEnter * call NERDTreeHighlightFile('yml', 'yellow', 'none', 'yellow', '#151515') 
au VimEnter * call NERDTreeHighlightFile('config', 'yellow', 'none', 'yellow', '#151515') 
au VimEnter * call NERDTreeHighlightFile('conf', 'yellow', 'none', 'yellow', '#151515') 
au VimEnter * call NERDTreeHighlightFile('json', 'yellow', 'none', 'yellow', '#151515') 
... 

but I got the square brackets in the file types for which I have changed color (see screenshot below).

As per documentation, :echo g:webdevicons_conceal_nerdtree_brackets returns 1.

  • I have searched the issues for my issue and found nothing related and/or helpful
  • I have read or at least glanced at the FAQ
  • I have read or at least glanced at the Wiki
  • VimDevIcons is the last loaded vim plugin?
  • What 9.0 of vim are you using?
  • What FiraCode are you using?
  • GUI vim?
  • Windows 10

Optional Info

  • [x]

image

@igbanam
Copy link

igbanam commented Apr 1, 2024

I'm having this problem as well. Whenever I re-source $MYVIMRC — which has a colorscheme line in it — even though the color stays the same, the icons render with square brackets around them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants