* Revert "feat(#2826): allow only one window with nvim-tree buffer per tab (#3174)"
This reverts commit dd2364d680.
* Revert "refactor(#2826): View tracks winids and bufnrs via events, unused for now (#3170)"
This reverts commit 65bae44922.
* Revert "refactor(#2826): remove view debug/cc, enable new codepaths for get_winid and get_bufnr (#3169)"
This reverts commit a9156c0139.
* refactor(#2826): fuller error messages
* refactor(#2826): winnr->winid in view/globals, remove redundant get_winid and get_bufnr calls
* refactor(#2826): winnr->winid consistently
* refactor(#2826): consistent use of buffer registry, tidy, add todos
* refactor(#2826): remove unnecessary view members float, hide_root_folder; use explorer opts
* refactor(#2826): remove unused view members centralize_selection and preserve_window_proportions
* refactor(#2826): remove unused view member height
* refactor(#2826): temporarily reuse BUFNR_PER_TAB in view constructor
* refactor(#2826): get_winid returns new after consistency check
* refactor(#2826): globals.TABPAGES -> WINID_PER_TAB
* refactor(#2826): consistent naming of tabid
* refactor(#2826): more consistency checking
* refactor(#2826): more consistency checking
* refactor(#2826): move global CURSORS to view member
* Revert "refactor(#2826): move global CURSORS to view member"
This reverts commit d84dfad1c3.
* refactor(#2826): move global CURSORS to view member
* refactor(#2826): consistency check returns new
* refactor(#2826): remove consistency checks, enabling new path for view get_winid and get_bufnr
* refactor(#2826): restore CURSORS global
* feat: allow passing node to collapse all
* refactor: use snake case
* feat: handle api legacy calls and update signature
* refactor: make sure open is a boolean
* doc: collapse_all
* Revert "doc: collapse_all"
This reverts commit d243da3e14.
* add api.node.collapse
* add api.node.expand
* add api.node.expand
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* feat: add quit_on_open opt to api.node.open.edit
* fix: fix missing @param annotation
* feat: add focus opt to api.node.open.edit
* fix: fix focus == false behaviour on api.node.open.tab command
* fix: add optional tabpage integer parameter to view.close
if tabpage is not nil, then the function closes the tabpage in this
specific tabpage
* fix: fix quit_on_open == true behaviour on api.node.open.tab command
* fix: add check to not use new opts for certain edit modes
* fix: add docs for new opts
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* feat(mappings): add key map to close file buffer
* feat: implement Api.node.buffer.delete
* feat: implement Api.node.buffer.wipe
* refactor: add util fn for common delete ops on bufs
* fix: minor fixes
* refactor: fix lint issues
* fix: undo unintended ApiTreeToggleOpts change
* fix: change error message level to info
* fix: remove unused opts
* refactor: merge delete-buffer and wipe-buffer into single buffer file
* refactor: make wipe and delete fns take a node instead of a file path
* docs: update help with new API commands
* remove refactored utils.lua
* remove unused static setup
* tweak doc
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* test
* add splits with no window pickers
removed the 1 buffer per file limitation
test
test2
* no-picker for splits
* help vertical/horizontal_no_picker
* revert whitespace changes
---------
Co-authored-by: JoeDaBu <joegbu@gmail.com>
Co-authored-by: Alexander Courtis <alex@courtis.org>
The `wrap_node` and `wrap_node_or_nil` functions now correctly accept `Node?` to handle nil values, resolving a warning about incorrect argument counts in `api.tree.change_root_to_node()`.
* add todo
* refactor(#2886): multi instance: node class refactoring: extract links, *_git_status (#2944)
* extract DirectoryLinkNode and FileLinkNode, move Node methods to children
* temporarily move DirectoryNode methods into BaseNode for easier reviewing
* move mostly unchanged DirectoryNode methods back to BaseNode
* tidy
* git.git_status_file takes an array
* update git status of links
* luacheck hack
* safer git_status_dir
* refactor(#2886): multi instance: node class refactoring: DirectoryNode:expand_or_collapse (#2957)
move expand_or_collapse to DirectoryNode
* refactor(#2886): multi instance: node group functions refactoring (#2959)
* move last_group_node to DirectoryNode
* move add BaseNode:as and more doc
* revert parameter name changes
* revert parameter name changes
* add Class
* move group methods into DN
* tidy group methods
* tidy group methods
* tidy group methods
* tidy group methods
* parent is DirectoryNode
* tidy expand all
* BaseNode -> Node
* move watcher to DirectoryNode
* last_group_node is DirectoryNode only
* simplify create-file
* simplify parent
* simplify collapse-all
* simplify live-filter
* style
* move lib.get_cursor_position to Explorer
* move lib.get_node_at_cursor to Explorer
* move lib.get_nodes to Explorer
* move place_cursor_on_node to Explorer
* resolve resource leak in purge_all_state
* move many autocommands into Explorer
* post merge tidy
* add todo
* refactor(#2886): multi instance: node class refactoring: extract links, *_git_status (#2944)
* extract DirectoryLinkNode and FileLinkNode, move Node methods to children
* temporarily move DirectoryNode methods into BaseNode for easier reviewing
* move mostly unchanged DirectoryNode methods back to BaseNode
* tidy
* git.git_status_file takes an array
* update git status of links
* luacheck hack
* safer git_status_dir
* refactor(#2886): multi instance: node class refactoring: DirectoryNode:expand_or_collapse (#2957)
move expand_or_collapse to DirectoryNode
* refactor(#2886): multi instance: node group functions refactoring (#2959)
* move last_group_node to DirectoryNode
* move add BaseNode:as and more doc
* revert parameter name changes
* revert parameter name changes
* add Class
* move group methods into DN
* tidy group methods
* tidy group methods
* tidy group methods
* tidy group methods
* parent is DirectoryNode
* tidy expand all
* BaseNode -> Node
* move watcher to DirectoryNode
* last_group_node is DirectoryNode only
* simplify create-file
* simplify parent
* simplify collapse-all
* simplify live-filter
* style
* more type safety
* Reapply "refactor(#2871, #2886): multi instance: node classes created (#2916)"
This reverts commit 50e919426a.
* fix(#2945): stack overflow on api.git.reload or fugitive event
* refactor(#2875): multi instance renderer
* refactor(#2875): multi instance renderer
* refactor(#2875): multi instance renderer
* refactor(#2875): multi instance renderer
* node classes and constructors
* node methods
* refactor(#2875): multi instance renderer
* node classes and constructors
* explorer is a directory node
* extract methods from explore_node
* extract methods from explore_node
* extract methods from explore_node
* extract methods from lib
* use .. name for root node for compatibility
* use node.explorer
* extract node factory, remove unused code
* factories for all nodes, add RootNode
* factories for all nodes, add RootNode
* use factory pattern for decorators
* note regression and commit
* fix dir git status regression
* destroy nodes, not explorer
* add BaseNode:is
* revert changes to create-file, handle in #2924
* extract methods from explorer
* extract methods from explorer
* extract methods from explorer
* use Node everywhere in luadoc
* extract methods from lib
* extract methods from lib
* lint
* remove unused code
* don't call methods on fake root node
* get_node_at_cursor returns explorer (root) node instead of { name = '..' }
* remove unused inject_node
* refactor(#2875): multi instance renderer
* refactor(#2875): multi instance renderer
* refactor(#2875): multi instance renderer
* extract methods from lib
* node factory uses stat only
* temporary DirectoryNode casting until method extraction into child classes
* lua-language-server 3.10.5 -> 3.11.0
* explicitly call Explorer constructor
* normalise explorer RootNode new call, tidy annotations
* feat(#2827): Multi Instance: Refactor: nvim-tree.live-filter
* refactor: all usages going through the explorer
* fix: api and filtration
* fix: style
* Update lua/nvim-tree/api.lua
Co-authored-by: Alexander Courtis <alex@courtis.org>
* docs: add missing live filter luadocs
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* feat: ungrouping empty directories
* add a new api to toggle empty folders
* solve comments
* solve comments
* update help
---------
Co-authored-by: juefei yan <juefeiyan@juefeis-MacBook-Air.local>
Co-authored-by: Alexander Courtis <alex@courtis.org>
* feat(#1389): add next recursive for git and diag moves
The recurse opt can be used to directly go to the next item showing
git/diagnostic status recursively.
Signed-off-by: Antonin Godard <antoningodard@pm.me>
* refactor: status logic in single function
Rename get_status to status_is_valid.
Use status_is_valid function in multiple place to avoid duplicating
code.
Signed-off-by: Antonin Godard <antoningodard@pm.me>
* feat(#1389): add prev recursive for git and diag moves
Signed-off-by: Antonin Godard <antoningodard@pm.me>
* fix(#1389): next recursive: take root node into account
The root node cannot have a status. Previously if moving from the root
node, status_is_valid was trying to fetch the status from it and errored.
Signed-off-by: Antonin Godard <antoningodard@pm.me>
* fix(#1389): doc: remove show_on_open_dirs limitation
Signed-off-by: Antonin Godard <antoningodard@pm.me>
* feat(#1389): move find_node_line to utils
Signed-off-by: Antonin Godard <antoningodard@pm.me>
* feat(#1389): doc: note recursive moves are to files only, tidy
---------
Signed-off-by: Antonin Godard <antoningodard@pm.me>
Co-authored-by: Alexander Courtis <alex@courtis.org>
* feat(#2148): add rename_full in API
* feat(#2148): add default mapping 'u' for rename_full
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>