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.64k stars 265 forks source link

why have the word "[ ]" front the directory #274

Closed myname9 closed 5 years ago

myname9 commented 5 years ago

i installed nerdtree last version,i installed vim-devicons last version,i have a problem why have the word "[ ]" front the directory

Required Info

$ vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Nov 29 2017 18:37:46)
Included patches: 1-503, 505-680, 682-1283
Compiled by root@apple.com

image

dborinsk commented 5 years ago

I updated nerdtree and devicons and since then im having the same issue.

myname9 commented 5 years ago

@dborinsk i download vim8.1 , absolute this issue, i think the issue is relation to vim8.0

chaneyzorn commented 5 years ago

I have the same with nvim 0.4.0

myname9 commented 5 years ago

@dborinsk @Campanula
let g:webdevicons_conceal_nerdtree_brackets = 1 complete

chaneyzorn commented 5 years ago

@myname9 Thank you, but it doesn't work for mine. I find a strange place:

image

the dir type goes wrong while the regular type is good.

dborinsk commented 5 years ago

@myname9 Not working for me as well NVIM v0.3.1

seemethere commented 5 years ago

Most likely has something to do with https://github.com/ryanoasis/vim-devicons/pull/255,

cc @ryanoasis

edit: can confirm, rolling back to 793fda6 resolves the issue

ryanoasis commented 5 years ago

@dborinsk @Campanula let g:webdevicons_conceal_nerdtree_brackets = 1 complete

@myname9 did you mean that let g:webdevicons_conceal_nerdtree_brackets = 1 solved the issue for you?


@dborinsk, @seemethere I was unable to replicate the issue on gvim or vim. I cleared my vimrc settings. Can you post your vimdevicon vimrc settings?

particularly check:

:set conceallevel?
:echo g:webdevicons_conceal_nerdtree_brackets
myname9 commented 5 years ago

@ryanoasis it did not solved the issue, but it can control the '[ ]' in a new vim. i installed vim8.1 and set let g:webdevicons_conceal_nerdtree_brackets = 1 solved the issue. however , my mac default vim8.0 have the issue now.

ryanoasis commented 5 years ago

I am only able able to test vim8.0

These worked for me:

:set conceallevel=2
let g:WebDevIconsUnicodeDecorateFolderNodes = 1

g:WebDevIconsUnicodeDecorateFolderNodes should be on by default but current isn't: https://github.com/ryanoasis/vim-devicons/blob/4ba84019a5d4c10e01eff62089c7385a39af3be5/plugin/webdevicons.vim#L65

chaneyzorn commented 5 years ago

@ryanoasis my nvim 0.4.0 (vim 8.1 occurs the same issue) :

:set conceallevel?  ==> conceallevel=3
:echo g:webdevicons_conceal_nerdtree_brackets ==> 1
:echo g:WebDevIconsUnicodeDecorateFolderNodes ==> 0

then , I set:

set conceallevel=2
let g:WebDevIconsUnicodeDecorateFolderNodes = 1

It goes to: image

the first dir still .

dborinsk commented 5 years ago

@ryanoasis my nvim 0.4.0 (vim 8.1 occurs the same issue) :

:set conceallevel?  ==> conceallevel=3
:echo g:webdevicons_conceal_nerdtree_brackets ==> 1
:echo g:WebDevIconsUnicodeDecorateFolderNodes ==> 0

then , I set:

set conceallevel=2
let g:WebDevIconsUnicodeDecorateFolderNodes = 1

It goes to: image

the first dir still .

Same here, I did the same steps and now the first directory is with [

seemethere commented 5 years ago

@dborinsk @Campanula let g:webdevicons_conceal_nerdtree_brackets = 1 complete

@myname9 did you mean that let g:webdevicons_conceal_nerdtree_brackets = 1 solved the issue for you?

@dborinsk, @seemethere I was unable to replicate the issue on gvim or vim. I cleared my vimrc settings. Can you post your vimdevicon vimrc settings?

particularly check:

:set conceallevel?
:echo g:webdevicons_conceal_nerdtree_brackets

@ryanoasis

❯ nvim --headless +'set conceallevel?'
  conceallevel=0 
❯ nvim --headless +':echo g:webdevicons_conceal_nerdtree_brackets'
1
❯ nvim --version
NVIM v0.3.6
Build type: RelWithDebInfo
Lua 5.3
Compilation: /usr/bin/cc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wconversion -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=1 -O2 -g -DMIN_LOG_LEVEL=3 -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -Wno-array-bounds -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/builddir/build/BUILD/neovim-0.3.6/build/config -I/builddir/build/BUILD/neovim-0.3.6/src -I/usr/include -I/builddir/build/BUILD/neovim-0.3.6/build/src/nvim/auto -I/builddir/build/BUILD/neovim-0.3.6/build/include
Compiled by mockbuild

Features: +acl +iconv -jemalloc +tui 
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

Some more info if it matters:

OS: fedora 29 nvimrc: https://github.com/seemethere/dotfiles/blob/master/vim/nvimrc

astroshot commented 5 years ago

image

I'm using vim 8.1 on MacOS and encounter this issue, with devicons settings as

" devicons config
if exists("g:loaded_webdevicons")
  call webdevicons#refresh()
endif
let g:airline_powerline_fonts = 1
let g:webdevicons_enable_vimfiler = 0
let g:webdevicons_conceal_nerdtree_brackets = 1
let g:WebDevIconsNerdTreeAfterGlyphPadding = ' '
let g:WebDevIconsNerdTreeGitPluginForceVAlign = 0
seemethere commented 5 years ago

Appears as though 6902851 fixes most of the issues but does leave a leading [

Screen Shot 2019-07-08 at 4 46 37 PM

Thanks for jumping on this so quick @ryanoasis!

netcan commented 5 years ago

image

I'm using vim 8.1 on MacOS and encounter this issue, with devicons settings as

" devicons config
if exists("g:loaded_webdevicons")
  call webdevicons#refresh()
endif
let g:airline_powerline_fonts = 1
let g:webdevicons_enable_vimfiler = 0
let g:webdevicons_conceal_nerdtree_brackets = 1
let g:WebDevIconsNerdTreeAfterGlyphPadding = ' '
let g:WebDevIconsNerdTreeGitPluginForceVAlign = 0

I have tested it when closed rainbow plugin, leave a leading [ may be conflit with rainbow plugin. set it to .vimrc:

let g:rainbow_conf = {
\    'separately': {
\       'nerdtree': 0
\    }
\}

but when set cwd to DIR(eg Downloads) will see DIR hasn't folder icon: image

@seemethere @astroshot @dborinsk @Campanula

astroshot commented 5 years ago

image I'm using vim 8.1 on MacOS and encounter this issue, with devicons settings as

" devicons config
if exists("g:loaded_webdevicons")
  call webdevicons#refresh()
endif
let g:airline_powerline_fonts = 1
let g:webdevicons_enable_vimfiler = 0
let g:webdevicons_conceal_nerdtree_brackets = 1
let g:WebDevIconsNerdTreeAfterGlyphPadding = ' '
let g:WebDevIconsNerdTreeGitPluginForceVAlign = 0

I have tested it when closed rainbow plugin, leave a leading [ may be conflit with rainbow plugin. set it to .vimrc:

let g:rainbow_conf = {
\    'separately': {
\       'nerdtree': 0
\    }
\}

but when set cwd to DIR(eg Downloads) will see DIR hasn't folder icon: image

@seemethere @astroshot @dborinsk @Campanula

Awesome, it worked for me! Many thanks