|
| 1 | +---@meta |
| 2 | +local nvim_tree = { api = { tree = {} } } |
| 3 | + |
| 4 | +---@class nvim_tree.api.tree.open.Opts |
| 5 | +---@inlinedoc |
| 6 | +---@field path string|nil path |
| 7 | +---@field current_window boolean|nil default false |
| 8 | +---@field winid number|nil |
| 9 | +---@field find_file boolean|nil default false |
| 10 | +---@field update_root boolean|nil default false |
| 11 | + |
| 12 | +---@param opts? nvim_tree.api.tree.open.Opts |
| 13 | +function nvim_tree.api.tree.open(opts) end |
| 14 | + |
| 15 | +---TODO #3088 descriptions are needed to properly format the functions |
| 16 | +function nvim_tree.api.tree.focus() end |
| 17 | + |
| 18 | +---@class nvim_tree.api.tree.toggle.Opts |
| 19 | +---@inlinedoc |
| 20 | +---@field path string|nil |
| 21 | +---@field current_window boolean|nil default false |
| 22 | +---@field winid number|nil |
| 23 | +---@field find_file boolean|nil default false |
| 24 | +---@field update_root boolean|nil default false |
| 25 | +---@field focus boolean|nil default true |
| 26 | + |
| 27 | +function nvim_tree.api.tree.toggle(opts) end |
| 28 | + |
| 29 | +function nvim_tree.api.tree.close() end |
| 30 | + |
| 31 | +function nvim_tree.api.tree.close_in_this_tab() end |
| 32 | + |
| 33 | +function nvim_tree.api.tree.close_in_all_tabs() end |
| 34 | + |
| 35 | +function nvim_tree.api.tree.reload() end |
| 36 | + |
| 37 | +---@class nvim_tree.api.tree.resize.Opts |
| 38 | +---@inlinedoc |
| 39 | +---@field width string|function|number|table|nil |
| 40 | +---@field absolute number|nil |
| 41 | +---@field relative number|nil |
| 42 | + |
| 43 | +function nvim_tree.api.tree.resize(opts) end |
| 44 | + |
| 45 | +function nvim_tree.api.tree.change_root() end |
| 46 | + |
| 47 | +function nvim_tree.api.tree.change_root_to_node() end |
| 48 | + |
| 49 | +function nvim_tree.api.tree.change_root_to_parent() end |
| 50 | + |
| 51 | +function nvim_tree.api.tree.get_node_under_cursor() end |
| 52 | + |
| 53 | +function nvim_tree.api.tree.get_nodes() end |
| 54 | + |
| 55 | +---@class nvim_tree.api.tree.find_file.Opts |
| 56 | +---@inlinedoc |
| 57 | +---@field buf string|number|nil |
| 58 | +---@field open boolean|nil default false |
| 59 | +---@field current_window boolean|nil default false |
| 60 | +---@field winid number|nil |
| 61 | +---@field update_root boolean|nil default false |
| 62 | +---@field focus boolean|nil default false |
| 63 | + |
| 64 | +function nvim_tree.api.tree.find_file(opts) end |
| 65 | + |
| 66 | +function nvim_tree.api.tree.search_node() end |
| 67 | + |
| 68 | +---@class nvim_tree.api.tree.collapse.Opts |
| 69 | +---@inlinedoc |
| 70 | +---@field keep_buffers boolean|nil default false |
| 71 | + |
| 72 | +function nvim_tree.api.tree.collapse_all(opts) end |
| 73 | + |
| 74 | +---@class nvim_tree.api.tree.expand.Opts |
| 75 | +---@inlinedoc |
| 76 | +---@field expand_until (fun(expansion_count: integer, node: Node): boolean)|nil |
| 77 | + |
| 78 | +function nvim_tree.api.tree.expand_all(opts) end |
| 79 | + |
| 80 | +function nvim_tree.api.tree.toggle_enable_filters() end |
| 81 | + |
| 82 | +function nvim_tree.api.tree.toggle_gitignore_filter() end |
| 83 | + |
| 84 | +function nvim_tree.api.tree.toggle_git_clean_filter() end |
| 85 | + |
| 86 | +function nvim_tree.api.tree.toggle_no_buffer_filter() end |
| 87 | + |
| 88 | +function nvim_tree.api.tree.toggle_custom_filter() end |
| 89 | + |
| 90 | +function nvim_tree.api.tree.toggle_hidden_filter() end |
| 91 | + |
| 92 | +function nvim_tree.api.tree.toggle_no_bookmark_filter() end |
| 93 | + |
| 94 | +function nvim_tree.api.tree.toggle_help() end |
| 95 | + |
| 96 | +function nvim_tree.api.tree.is_tree_buf() end |
| 97 | + |
| 98 | +---@class nvim_tree.api.tree.is_visible.Opts |
| 99 | +---@inlinedoc |
| 100 | +---@field tabpage number|nil |
| 101 | +---@field any_tabpage boolean|nil default false |
| 102 | + |
| 103 | +function nvim_tree.api.tree.is_visible(opts) end |
| 104 | + |
| 105 | +---@class nvim_tree.api.tree.winid.Opts |
| 106 | +---@inlinedoc |
| 107 | +---@field tabpage number|nil default nil |
| 108 | + |
| 109 | +function nvim_tree.api.tree.winid(opts) end |
| 110 | + |
| 111 | +require("nvim-tree.api").hydrate_tree(nvim_tree.api.tree) |
| 112 | + |
| 113 | +return nvim_tree.api.tree |
0 commit comments