* 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>
* chore(mappings): migrate legacy mappings under the hood
* chore(mappings): POC for help and :help on_attach keymaps
* chore(mappings): POC for help and :help on_attach keymaps
* chore(mappings): add desc to all mappings, show in help, reformat help
* chore(mappings): add desc to all mappings
* chore(mappings): add desc to all mappings
* chore(mappings): escape help keys
* chore(mappings): migrate legacy mappings under the hood: map keymap to legacy mappings
* chore(mappings): migrate legacy mappings under the hood: remove dispatch
* Revert "chore(mappings): migrate legacy mappings under the hood: remove dispatch"
This reverts commit f6f439ba59.
* chore(mappings): migrate legacy mappings under the hood: pass node to action_cb
* chore(mappings): migrate legacy mappings under the hood: remove dispatch
* chore(mappings): migrate legacy mappings under the hood: replace mappigns with keymaps in help
* chore(mappings): generate on_attach from user's legacy mappings
* chore(mappings): generate on_attach from user's legacy mappings
* chore(mappings): merge cleanup
* chore(mappings): use default mappings when on_attach not present, log legacy migration
* on_attach is default or user only, legacy and generation includes defaults (#1777)
* chore(mappings): remove mappings via vim.keymap.del instead of filtering mappings, to allow for multiple ways of specifying a key
* doc: specify that the terminal emulator must be configured to use the patched font
* feat(renderer): add NvimTreeOpenedFolderIcon NvimTreeClosedFolderIcon (#1768)
* feat: Add highlight group for opened folder
closes#1674
* docs: Add NvimTreeOpenedFolderIcon default
* feat: Add NvimTreeClosedFolderIcon highlight group
Defaults to NvimTreeFolderIcon
* feat: add diagnostics.show_on_open_dirs git.show_on_open_dirs (#1778)
* feat(diagnostics): only show diagnostic on closed folder
* feat(git): only show git icon on closed folder
* docs: Update feature_request.md (#1788)
* Update feature_request.md
Closes#1654
* Update feature_request.md
Co-authored-by: Alexander Courtis <alex@courtis.org>
* 1786 git next prev land on dirs (#1787)
* Filtered dir with git status that are open when show_on_open_dir is false
* refactored for single source of truth of existence of git status on a node
Putting `has_git_status()` in `explorer.common` because that's where node.status is constructed
Or at least I think that's where it's constructed
* 1786 semantic nit
Co-authored-by: Alexander Courtis <alex@courtis.org>
* fix(git): git rename not showing up for the renamed file (#1783)
* fixed git rename not showing up for the renamed file
* considered " -> " being a part of the filename
Fixed -> pattern to escape -
Fixed "\"" and "\\" in filename
* using string.find(, , true) to match plain ->
* Using -z and removed unnecessary logic
* feat(view): always enable cursorline, users may change this behaviour via Event.TreeOpen (#1814)
* Update view.lua
* set cursorline to true
* feat(event): dispatch Event.NodeRenamed on cut-paste (#1817)
* feat(view): add filters.git_clean, filters.no_buffer (#1784)
* feat(view): add filters.git_clean
* feat(view): add filters.git_clean
* feat(view): add filters.no_buffer
* feat(view): filters.no_buffer misses unloaded, handles buffer in/out
* feat(view): filters.no_buffer matches directories specifically
* feat(view): filters.no_buffer clarify targets
* feat: add placeholder filters.diagnostics_ok, refactor filters
* feat(view): remove placeholder filters.diagnostics_ok
* doc: consolidate and clarify :help examples
* doc: format help
* feat: paste and create always target closed folder, remove create_in_closed_folder (#1802)
* Fix default for file creation in closed directories
* Make paste in closed directories consistent with create
* doc: clarify create_in_closed_folder
* Remove create_in_closed_folder option
* doc: clarify create_in_closed_folder removal message (whoops)
Co-authored-by: Alexander Courtis <alex@courtis.org>
* on_attach is user's or default, nothing else; legacy generated on_attach includes defaults
Co-authored-by: baahrens <bahrens@compeon.de>
Co-authored-by: Richard Li <38484873+chomosuke@users.noreply.github.com>
Co-authored-by: gegoune <69750637+gegoune@users.noreply.github.com>
Co-authored-by: rishabhjain9191 <rishabh.jain9191@gmail.com>
Co-authored-by: Anton <14187674+antosha417@users.noreply.github.com>
Co-authored-by: Eric Haynes <ehaynes99@gmail.com>
* on_attach_default hardcoded
* format default_on_attach
* source default on_attach directly
* remove human mappings help
* simplified on_attach generation
* simplified on_attach generation
* generate default on_attach
* generate default on_attach
* split out keymap_legacy
* add recently introduced mappings
* legacy api.config.mappings.active and default
* legacy api.config.mappings.active and default
* on_attach help and readme
* legacy generate handles action = ""
* legacy generate handles action =
* legacy generate gives defaults when no user mappings
* legacy generate handles action = ""
* legacy generate api handles overrides
* legacy generate handles subsequent setup, on_attach retains deep copies of legacy config
* add wiki link to generated on_attach
* add opts helper function for on_attach, prefixing 'nvim-tree: '
---------
Co-authored-by: kiyan <yazdani.kiyan@protonmail.com>
Co-authored-by: baahrens <bahrens@compeon.de>
Co-authored-by: Richard Li <38484873+chomosuke@users.noreply.github.com>
Co-authored-by: gegoune <69750637+gegoune@users.noreply.github.com>
Co-authored-by: rishabhjain9191 <rishabh.jain9191@gmail.com>
Co-authored-by: Anton <14187674+antosha417@users.noreply.github.com>
Co-authored-by: Eric Haynes <ehaynes99@gmail.com>