Skip to content

API: tree.resize #2598

Closed
Closed
@alex-courtis

Description

@alex-courtis

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    APIAPI or EventPR pleasenvim-tree team does not have the bandwidth to implement; a PR will be gratefully appreciatedfeature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions