* 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>
* Fix get_size() function when size is a function return string
* update view.width help
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* fix(#2954): use LSP diagnostic data deltas from events instead of a full query
* fix(#2954): use LSP diagnostic data deltas from events instead of a full query
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()`.
This ensures that LSP diagnostics of files which are not manually opened
by users are rendered by nvim-tree diagnostic indicators.
However when users attach an LSP to nvim-tree this will bring back
flashing as attempted to fix in #2980. Fixing this should probably done
by checking data passed via diagnostic events (DiagnosticChanged and
CocDiagnosticChanged).
Signed-off-by: des-b <66919647+des-b@users.noreply.github.com>
* fix(#2954): set buffer options in deterministic order
This ensures related autocmd's (e.g. on FileType) will be called in a
similar environment.
* fix(#2954): redraw only for diagnostics if source buffer is 'buflisted'
is_buf_valid has been inlined since it is only used for diagnostics
and its name is misleading.
* 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
* Revert "fix(#2862): windows path replaces backslashes with forward slashes (#2903)"
This reverts commit 45a93d9979.
* fix the case when '()' and '[]' are both in file path
* remove debug messages
* remove unnecessary comments
* add is_windows feature flag when normalizing path
* add is_windows flag for filename change
* Revert "add is_windows flag for filename change"
This reverts commit ada77cb7e9.
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* 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
* fix: use of possibly stale value
The return value of `core.get_explorer()` could be changed by `core.init(..)`.
* fix style
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* refactor(#2875): multi instance renderer
* refactor(#2875): multi instance renderer
* refactor(#2875): multi instance renderer
* refactor(#2875): multi instance renderer
* refactor(#2875): deal with some cyclic require
* refactor(#2875): multi instance renderer
* refactor(#2875): multi instance renderer
* refactor(#2875): multi instance renderer
* refactor(#2875): multi instance renderer
* refactor(#2875): multi instance renderer
* refactor(#2875): multi instance renderer
* refactor(#2875): multi instance renderer
* refactor(#2875): multi instance renderer
* refactor(#2875): multi instance renderer
* refactor(#2875): multi instance renderer
* refactor(#2875): multi instance renderer