Sublime Forum

FileBrowser Package Customization

#1

Hello fellow sublimers, I am having a bit of issue trying to setup file icons to work with FileBrowser package which is essentially a replicate for file browsing such as nvim or emacs editors, and it allows you to go through your whole tree structure at any given time and it is not fixed in some sense like the default sublime tree which basically allows you to preview files only that are inside the folder you have opened and are working in, but this allows you to see the whole structure, your whole file explorer or finder.

I want to get the icons working and I have no success so far, to demonstrate what I mean I will post an image here, so basically I have my own file icons which I customized to work with the default sublime side tree view and it looks great but now I want to expand it to this file browser package and I dont have any luck whatsoever, and I was wondering if somebody is using this package and maybe knows how to set it up.


This image showcases the default tree view sidebar in sublime and you can see I have these icons there, and then in the middle you can see this FileBrowser package which I am trying to setup, which doesnt have those icons.

So if anybody has any idea or any clue please share your thoughts. Thanks :smiley:

0 Likes

#2

I don’t think this is implemented as these views are text-only IIRC. If we were to support icons we would need to draw them – in a text buffer, probably using phantoms or so. I don’t remember seeing such code in the plugin.

0 Likes

#3

Aha I see, well I am thinking off giving it a try and tinkering with this, I find the filebrowser to be much more superior than using only the defualt sidebar in sublime and I am really missing the icons I think they are a great addition to this package so I might give it a shot.

I already made some small function script in .py for toggling and made it work so I am interested to see if this can be done.

0 Likes

#4

Maybe instead of .png-icons and phantoms, a nerd-font with icons (just like in the Terminal) would make more sense.

0 Likes

#5

Yeah maybe I will give that a try, I was thinking of looking up how the nvim or emacs generates theirs because they are using some terminal look alike, so maybe I will see what can be done on that behalf.

0 Likes

#6

I managed to get it working, editing the file of the package itself and adding the Nerd Fonts like you said and somehow it actually worked. This look awesome now, I will still tweak it a bit and make it be a bit cooler so not just one colored and so forth:

So it was actually a great idea to think of the Nerd Font to use, would not have thought of that, thanks for the insight :smile:

EDIT: Nevermind it is not fully functional, it displays things in wrong order so I need to fix that and also it sometimes reverts back to old look so I have to see how and why this happens, will let you know if I figure it out. :frowning_face:

0 Likes