* 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.
* chore: luals runtime.version only set during check, to prevent lua version ambuguity at dev time
* inject lua 5.1 check failure
* Revert "inject lua 5.1 check failure"
This reverts commit eed966dc7b.
* 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
* feat(#2938): filesystem_watchers.ignore_dirs defaults to { node_modules } to resolve pathalogical issues
* feat(#2938): more filesystem_watchers.ignore_dirs defaults to to resolve pathalogical issues
* feat(#2938): more filesystem_watchers.ignore_dirs defaults to to resolve pathalogical issues
* 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>