|
1 | 1 | ---@meta |
2 | 2 | error("Cannot require a meta file") |
3 | 3 |
|
| 4 | +-- |
| 5 | +-- API Options |
| 6 | +-- |
| 7 | + |
| 8 | +---@class nvim_tree.api.TreeOpenOpts |
| 9 | +---@field path? string root directory for the tree |
| 10 | +---@field current_window? boolean open the tree in the current window |
| 11 | +---@field winid? number open the tree in the specified winid, overrides current_window |
| 12 | +---@field find_file? boolean find the current buffer |
| 13 | +---@field update_root? boolean requires find_file, see |nvim-tree.update_focused_file.update_root| |
| 14 | +---@field focus? boolean focus the tree when opening, default true |
| 15 | + |
| 16 | +---@class nvim_tree.api.TreeToggleOpts |
| 17 | +---@field path? string root directory for the tree |
| 18 | +---@field current_window? boolean open the tree in the current window |
| 19 | +---@field winid? number open the tree in the specified |winid|, overrides current_window |
| 20 | +---@field find_file? boolean find the current buffer |
| 21 | +---@field update_root? boolean requires find_file, see |nvim-tree.update_focused_file.update_root| |
| 22 | +---@field focus? boolean focus the tree when opening, default true |
| 23 | + |
| 24 | +---@class nvim_tree.api.TreeResizeOpts |
| 25 | +---@field width? string|function|number|table new |nvim-tree.view.width| value |
| 26 | +---@field absolute? number set the width |
| 27 | +---@field relative? number relative width adjustment |
| 28 | + |
| 29 | +---@class nvim_tree.api.TreeFindFileOpts |
| 30 | +---@field buf? string|number absolute/relative path OR bufnr to find |
| 31 | +---@field open? boolean open the tree if necessary |
| 32 | +---@field current_window? boolean requires open, open in the current window |
| 33 | +---@field winid? number open the tree in the specified |winid|, overrides current_window |
| 34 | +---@field update_root? boolean see |nvim-tree.update_focused_file.update_root| |
| 35 | +---@field focus? boolean focus the tree |
| 36 | + |
| 37 | +---@class nvim_tree.api.CollapseOpts |
| 38 | +---@field keep_buffers? boolean do not collapse nodes with open buffers |
| 39 | + |
| 40 | +---@class nvim_tree.api.TreeExpandOpts |
| 41 | +---@field expand_until? (fun(expansion_count: integer, node: Node): boolean) Return true if node should be expanded. expansion_count is the total number of folders expanded. |
| 42 | + |
| 43 | +---@class nvim_tree.api.TreeIsVisibleOpts |
| 44 | +---@field tabpage? number as per |nvim_get_current_tabpage()| |
| 45 | +---@field any_tabpage? boolean visible on any tab, default false |
| 46 | + |
| 47 | +---@class nvim_tree.api.TreeWinIdOpts |
| 48 | +---@field tabpage? number tabpage, 0 or nil for current, default nil |
| 49 | + |
| 50 | +---@class nvim_tree.api.NodeEditOpts |
| 51 | +---@field quit_on_open? boolean quits the tree when opening the file |
| 52 | +---@field focus? boolean keep focus in the tree when opening the file |
| 53 | + |
| 54 | +---@class nvim_tree.api.NodeBufferOpts |
| 55 | +---@field force? boolean delete/wipe even if buffer is modified, default false |
| 56 | + |
4 | 57 | -- |
5 | 58 | -- Nodes |
6 | 59 | -- |
|
0 commit comments