nvim-tree.lua icon indicating copy to clipboard operation
nvim-tree.lua copied to clipboard

Add an option to modify tree padding/indentation

Open charbelnicolas opened this issue 2 years ago • 6 comments

I think adding an indent/padding to the tree would be nice.

Describe the solution you'd like

Add an option to modify the padding/indent of children in the tree (components/padding.lua)

function M.get_padding(depth, idx, nodes_number, node, markers) local padding = " "

Describe alternatives you've considered

Editing the source file directly and adding a space " ".

Before:

20230224_174905

After:

20230224_174939

It looks a bit nicer!

charbelnicolas avatar Feb 24 '23 22:02 charbelnicolas

Add an option to modify the padding/indent of children in the tree (components/padding.lua)

view.width.padding can take a function, a similar callback may be added.

Possibility: pass the node to the callback.

alex-courtis avatar Feb 26 '23 22:02 alex-courtis

I will try to make the PR.

samuelnihoul avatar Mar 17 '23 13:03 samuelnihoul