vim-fern-renderer-nerdfont icon indicating copy to clipboard operation
vim-fern-renderer-nerdfont copied to clipboard

Any way to add padding before the root folders?

Open creativenull opened this issue 3 years ago • 4 comments

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?

creativenull avatar Oct 24 '22 18:10 creativenull

Unfortunately no.

lambdalisue avatar Oct 25 '22 18:10 lambdalisue

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.

creativenull avatar Oct 28 '22 15:10 creativenull

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

lambdalisue avatar Oct 29 '22 09:10 lambdalisue

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

creativenull avatar Oct 29 '22 18:10 creativenull

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

lambdalisue avatar Oct 31 '22 15:10 lambdalisue