Closed
Description
Background: #2595
Add API similar to :NvimTreeResize
.
tree.resize({opts}) *nvim-tree-api.tree.resize()*
Resize the tree, persisting the new size.
Resets to |nvim-tree.view.width| when no {opts} provided.
See |:NvimTreeResize|
Parameters: ~
• {opts} (table) optional parameters
Options: ~
• {width} (table) new |nvim-tree.view.width| value
• {absolute} (number) set the width
• {relative} (number) increase or decrease the width
Only one option is supported, in the priority order above.
{absolute} and {relative} do nothing when {width} is a function.
It may be best to have 3 methods due to the exclusive nature of the options. Look at api.txt and lua.txt for guidance.