Skip to content

api.tree.find_file feature parity #2011

@alex-courtis

Description

@alex-courtis

api.tree.find_file lacks feature parity with :NvimTreeFindFile and :NvimTreeFindFileToggle:

  • bang - update root
  • focus
  • current buffer

Add similar options to open and toggle:

api.tree.find_file({opts})                     *nvim-tree.api.tree.find_file()*
    Find and focus a file or folder in the tree.

    Parameters: ~{opts} (table) optional parameters with boolean defaults

    Options: ~{path}           (string)         absolute path otherwise current buffer
    • {open}           (boolean, false) open the tree
    • {current_window} (boolean, false) open the tree in the current window
    • {update_root}    (boolean, false) see |nvim-tree.update_focused_file.update_root|{focus}          (boolean, false) focus the tree
---@class ApiTreeFindFileOpts
---@field path string|nil
---@field open boolean|nil default false
---@field current_window boolean|nil default false
---@field update_root boolean|nil default false
---@field focus boolean|nil default false

Move nvim-tree.find_file into find-file.

Resolves:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions