justinmk / vim-dirvish

Directory viewer for Vim :zap:
Other
1.18k stars 64 forks source link

more than one character as an icon #145

Open GabeDuarteM opened 5 years ago

GabeDuarteM commented 5 years ago

I'm trying to add ryanoasis/vim-devicons to the dirvish buffer, calling dirvish#add_icon_fn({p -> WebDevIconsGetFileTypeSymbol(p)})

This does add the correct icons, but unfortunately theres not enought spacing between them and the text, as you can see by the image below.

image I'd like to add more spacing between the icon and the text, so I tried appending it to the icon, like dirvish#add_icon_fn({p -> WebDevIconsGetFileTypeSymbol(p) . ' '}), but this does nothing (I guess this is being trimmed somewhere), and if I try to do it like dirvish#add_icon_fn({p -> WebDevIconsGetFileTypeSymbol(p).'x'}), I get the following error while trying to run :Dirvish

image

Is there any way of adding more spacing to either the icon or the filepath?

justinmk commented 5 years ago

Not yet, because Vim's "conceal" feature only supports 1 char.

Should work if https://github.com/vim/vim/issues/4687 is ever resolved.