lambdalisue / vim-fern-renderer-nerdfont

🌿 fern.vim plugin which add file type icon through nerdfont.vim
MIT License
79 stars 12 forks source link

Add options for paddings (spaces) around symbols (icons) of leaves/branches #21

Closed creativenull closed 1 year ago

creativenull commented 1 year ago

As the title says, I see there is no spacing between the root folders and the sign column/line numbers. Here is a screenshot:

Screenshot 2022-10-24 at 14 16 21

Is there any way to add some padding before it?

lambdalisue commented 1 year ago

Unfortunately no.

creativenull commented 1 year ago

Hmmm I see, I saw that the default renderer had a symbol prefix to the root folder so I thought it would've been possible to replace that with a space instead on the nerdfont renderer, showing the default renderer at the image below.

image

I'm sorry if this would be the wrong place to have this feature for fern, but if there is a way to do this.

lambdalisue commented 1 year ago

I'm sorry but I think I don't get the situation. Could you explain your situation and want more clearly?

creativenull commented 1 year ago

Sorry if I wasn't clear, but what I wanted was some padding between files/folders when I view them.

So basically a way to change how it would look like, if this is not a feature that can be done then that's fine as well, I could look into the code and see what I could do to get those padding, no worries :)

For example for the default renderer, this is what I have:

let g:fern#renderer#default#root_symbol = ' @@ '
let g:fern#renderer#default#leaf_symbol = ' '
let g:fern#renderer#default#collapsed_symbol = ' + '
let g:fern#renderer#default#expanded_symbol = ' - '
let g:fern#renderer#default#leading = '  '

And here is how it looks, note the space before the + is what I want:

image

But I cannot do this with the nerdfont renderer because it doesn't have variables for leaf, collapsed and expanded symbols where I could add some spacing.

Edit: space before + not after

lambdalisue commented 1 year ago

Thanks. Now I got :+1:

Well, it's not possible with the current implementation but PR is welcome 👍

https://github.com/lambdalisue/fern-renderer-nerdfont.vim/blob/master/autoload/fern/renderer/nerdfont.vim#L99 https://github.com/lambdalisue/fern-renderer-nerdfont.vim/blob/master/autoload/fern/renderer/nerdfont.vim#L123