Vim-devicons: Cannot get devicons to show on the startify

Created on 14 Feb 2020  Â·  13Comments  Â·  Source: ryanoasis/vim-devicons

Issue description

Hi all! :) I have one issue I cannot solve related to vim-devicons and startify. I simply cannot get devicons to show on the startify. I have devicons in my NERDtree, they are functioning properly there but cannot get them in startify.
I put these lines at the end of my "init.vim" file:

" Reload icons after init source
if exists('g:loaded_webdevicons')
  call webdevicons#refresh()
endif
" adding to vim-startify screen
let g:webdevicons_enable_startify = 1

let entry_format = "'   ['. index .']'. repeat(' ', (3 - strlen(index)))"

if exists('*WebDevIconsGetFileTypeSymbol')  " support for vim-devicons
  let entry_format .= ". WebDevIconsGetFileTypeSymbol(entry_path) .' '.  entry_path"
else
  let entry_format .= '. entry_path'
endif

I would appreciate some help. Thanks in advance! :)

Required Info

  • [x] I have searched the issues for my issue and found nothing related and/or helpful
  • [x] I have read or at least glanced at the FAQ
  • [x] I have read or at least glanced at the Wiki
  • [x] VimDevIcons is the last loaded vim plugin?
  • [x] What version of vim are you using?
    NVIM v0.5.0-dev
  • [x] What version of vim-devicons are you using?
    0.11.0
  • [x] Are you using vim from the terminal or a GUI vim?
    I'm using NeoVim from terminal emulator (Kitty)
  • [x] Are you using Mac, Linux or Windows?
    Linux (Ubuntu 18.04 LTS)
✨ enhancement

Most helpful comment

yeah so bookmarks feature doesn't currently work. this would be good to add

All 13 comments

Any ideas??

EDIT:
I can see devicons for MRU (most recently used) but cannot get devicons for Sessions and Bookmarks.
Is this a bug or was it so intentionally made?

Can you share a minimal vimrc that reproduces the issue? Can you check that vim-devicons is loaded last?

Hi @ryanoasis !
Devicons are loaded last.
I can see devicons for MRU "most recently used" files but it would be also really cool if I could get those devicons for bookmarked files. I'll attach photos here.
example-devicons-startify-no-icons
example-devicons-startify-icons

Is it possible to make them visible for the bookmarked files?

hmm are Bookmarks a recent/new feature of startify? It's been a while for me...

Hmmm, I really don't know...🤔 I'm using startify for maybe 2 months. I discovered it really makes a difference in my Vim workflow. When I need to switch between a lot of projects it really makes that process easier (especially if you combine session restore with it). Like a full blown IDE😎

And bookmarks are files that you explicitly add to a list. Really handy for files you want to reach quickly.

So I thought it would be really nice if there could be a devicon on the left side of the file name just like there are devicons before recently used ones?
I'm sure it could be also done for sessions (icon of a directory or something similar) but don't know if that's complicated to accomplish...

yeah so bookmarks feature doesn't currently work. this would be good to add

yeah so bookmarks feature doesn't currently work. this would be good to add

That would be awesome! Thanks in advance!

After a bit of searching through the code in vim-startify, I found the problem is that the function StartifyEntryFormat() is not used by startify to generate the bookmarks list. I opened a PR to fix the issue here.

Thanks @lovetocode999 , works like a charm!

@lovetocode999
Thanks for your report!

@igorlakic
Doesn't this issue have anything to do with vim-devicons?
Based on the conversation, I'm guessing that this feels like a startify issue.

No reply, close.

@kazukazuinaina Sorry, I forgot to answer. Yes, the issue is fixed on the Startify side. Or to be more precise - @lovetocode999 made a PR but it wasn't merge yet...

It's merged now. :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ctaylo21 picture ctaylo21  Â·  3Comments

soulomoon picture soulomoon  Â·  10Comments

divramod picture divramod  Â·  7Comments

marioortizmanero picture marioortizmanero  Â·  3Comments

shammellee picture shammellee  Â·  4Comments