Tomasz N
9a05b9e9f9
perf( #3171 ): use vim.system() instead of vim.fn.system() to execute git toplevel ( #3175 )
...
* fix(#3171 ): use vim.system() to determine git toplevel
* Don't use vim.trim
* Ensure sdtout is a string
* Keep Nvim 0.9 compatibility
* Use vim.system to query git config for status.showUntrackedFiles too
2025-08-05 13:23:51 +10:00
Alexander Courtis
3fc8de198c
chore: migrate to classic ( #2991 )
...
* add classic, migrating nodes classes
* add mixins to classic
* typechecked optargs constructors for nodes
* typechecked optargs constructors for watcher and event
* luacheck
* typechecked optargs constructors for GitRunner
* typechecked optargs constructors for Sorter
* typechecked optargs constructors for decorators, WIP
* typechecked optargs constructors for decorators, WIP
* typechecked optargs constructors for decorators
* remove class
* replace enums with named maps
* Renderer and Builder use classic, tidy opts
* LiveFilter uses classic, tidy opts
* Filter uses classic, tidy opts
* add FilterTypes named map
* move toggles into filters
* Marks uses classic, tidy opts
* Sorter uses classic, tidy opts
* Clipboard uses classic, tidy opts
* use supers for node methods
* HighlightDisplay uses classic
* protected :new
* Watcher tidy
* Revert "use supers for node methods"
This reverts commit 9fc7a866ec .
* Watcher tidy
* format
* format
* Filters private methods
* format
* Sorter type safety
* Sorter type safety
* Sorter type safety
* Sorter type safety
* Sorter type safety
* Sorter type safety
* tidy Runner
* tidy hi-test name
2024-11-09 14:14:04 +11:00
Alexander Courtis
610a1c189b
chore: resolve undefined-field warnings, fix link git statuses, rewrite devicons ( #2968 )
...
* 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
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* Revert "chore: resolve undefined-field"
This reverts commit be546ff18d41f28466b065c857e1e041659bd2c8.
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* Revert "chore: resolve undefined-field"
This reverts commit e82db1c44d .
* chore: resolve undefined-field
* chore: class new is now generic
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* Revert "chore: resolve undefined-field"
This reverts commit 0e9b844d22 .
* move icon builders into node classes
* move icon builders into node classes
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* chore: resolve undefined-field
* move folder specifics from icons to Directory
* move folder specifics from icons to Directory
* move folder specifics from icons to Directory
* move folder specifics from icons to Directory
* move file specifics from icons to File
* clean up sorters
* chore: resolve undefined-field
* tidy hl icon name
* file devicon uses library to fall back
* file devicon uses library to fall back
* file devicon uses library to fall back
2024-11-03 14:06:12 +11:00
Alexander Courtis
1ae1c33ce1
chore( #2931 ): stylua -> EmmyLuaCodeStyle ( #2932 )
...
* stylua -> EmmyLuaCodeStyle: config and doc
* stylua -> EmmyLuaCodeStyle: CI
* stylua -> EmmyLuaCodeStyle: CI
* stylua -> EmmyLuaCodeStyle: CI
* stylua -> EmmyLuaCodeStyle: CI
* stylua -> EmmyLuaCodeStyle: CI
* stylua -> EmmyLuaCodeStyle
* stylua -> EmmyLuaCodeStyle: call_arg_parentheses = always
* stylua -> EmmyLuaCodeStyle
* stylua -> EmmyLuaCodeStyle
2024-09-29 14:05:52 +10:00
Azad
13f967f8e7
chore: add type annotations and resolve LSP warnings ( #2555 )
...
* chore: add type annotations to (almost) all functions
* stylua
* Add classes for symlink nodes
* Replace deprecated `@vararg`
* Move node classes to `node` module
* Fix `Symlink*` classes
* add vim and libuv runtime for luals, qualify libuv types
* add scripts/luals-check, not quite ready for CI
* additional nil checks for git/init.lua and git/runner.lua
* additional nil checks for nvim-tree.lua
* wrap vim.cmd-as-a-function calls inside functions
* vim.tbl_filter predicate returns booleans
* Revert "add scripts/luals-check, not quite ready for CI"
This reverts commit c70229cad9 .
* Add `MinimalNode` class in `marks` module
* Fix various LSP warnings
* stylua
* Fix `Explorer` class, update related annotations and add necessary checks
* Add missing annotations to `live-filter`
* Add temporary aliases for `uv.*` types
* Resolve remaining LSP warnings
* Revert changes not related to internal types
* Minor adjustments
* Update doc comments style
* Minor adjustments (pt. 2)
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-12-09 11:34:35 +11:00
rei
7c5c074354
fix( #2467 ): remove newline in git paths when using cygwin_support ( #2478 )
...
* fix(#2467 ): remove newline in git paths
* fix: info size suffix and formatting (#2492 )
- Now there is a whitespace between value and unit.
- Now values >= 1024 YiB are shown in YiB instead of B.
- To reuse same code a new local function was added: round().
* feat(#2312 ): fire `TextYankPost` event on path copy (#2489 )
* feat(#2312 ): fire `TextYankPost` event on path copy
* stylua
* Bug fix
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* feat: mapping and options to sort entries in help window (#2482 )
* feat: add option to sort entries in help window
* stylua
* Add keymap to toggle sorting methods
* Bug fix
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
* fix(#2467 ): remove newline in git paths
* fix(#2467 ): change cygpath calls to array format
To avoid shell compatibility issues in msys2 environment on Windows
* stylua nit
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
Co-authored-by: Andrew Voynov <37143421+Andrew15-5@users.noreply.github.com>
Co-authored-by: Azad <49314270+Akmadan23@users.noreply.github.com>
2023-10-30 11:39:32 +11:00
Alexander Courtis
db8145c27d
fix( #2459 ): disable cygwin git support by default, see :help nvim-tree.git.cygwin_support to enable ( #2486 )
2023-10-21 16:34:34 +11:00
Alexander Courtis
28c3980b25
fix( #2382 ): git watcher handles worktrees and submodules, via --absolute-git-dir when it is available ( #2389 )
...
* fix(#2382 ): use --absolute-git-dir when available
* fix(#2382 ): use --absolute-git-dir when available
* fix(#2382 ): rename private git members, destroy git watchers on purge
* fix(#2382 ): consistent naming of toplevel
* fix(#2382 ): more doc and safety
* fix(#2382 ): consistent naming of toplevel
* fix(#2382 ): consistent naming of toplevel
2023-09-02 12:05:34 +10:00
Anton Kriese
f5804ce94e
fix: fs_watcher not started for .git folders (windows) ( #2265 )
...
This fixes the issue described in #2243 , where the .git folder's path
ends on a weird character produced by `cygpath` when the newline
character is fed into it (when using shell=powershell)
2023-06-12 15:44:52 +10:00
Alexander Courtis
63061404f4
feat( #1837 ): add git.disable_for_dirs ( #2239 )
...
* feat(##1837): add git.disabled_dirs
* feat(#1837 ): add git.disable_for_dirs
* feat(#1837 ): note disable_for_dirs evaluation
2023-06-04 14:29:04 +10:00
Alexander Courtis
1f5bbc1efd
Revert "fix( #1976 ): support non-standard $GIT_DIR ( #2012 )"
...
This reverts commit 517dee64c1 .
2023-04-29 16:42:51 +10:00
Damien Mehala
517dee64c1
fix( #1976 ): support non-standard $GIT_DIR ( #2012 )
...
* Improve $GIT_DIR handling
- Retrieve $GIT_DIR using `git rev-parse --absolute-git-dir`
- Move $GIT_DIR ignore in the project exploration part
Resolves #1976
* Code review
- move norm_path to utils.lua
- fix comment #2012
* add comments for utils.norm_path
* get_git_directory use norm_path from utils
* watcher improvements
---------
Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-04-22 13:26:43 +10:00
Alexander Courtis
b712b82b0c
fix( #1961 ): harden profiling functions ( #1986 )
2023-02-11 17:05:01 +11:00
Richard Li
29788cc32a
fix(git): git folder fixes and improvements ( #1809 )
...
* coding style
* outlined git.show_on_open_dirs behavior
* show some icon on opendir even if show_on_open_dir=false
and show all children's status on parent
* fixed renamed icon not showing
* sorted icons
* removed DU from deleted as file will show up in tree
* fixed update_git_status in reloaders not tested
* fixed Api.git.reload()
Tested update_git_status in reloaders.lua
* sort icon only if not git signcolumn
* fixed crashing when root dir isn't git dir
* made git.show_on_dirs doc more concise
* git_statuses -> git_status for consistency
* explorer/common.lua -> explorer/node.lua
* fixed #1784 conflict
* don't order icons
* Revert "don't order icons"
This reverts commit 23f6276ef7 .
2022-12-17 17:05:33 +11:00
kiyan
4aef454cd2
fix(styling): empty line
2022-09-29 13:59:05 +02:00
Xyhlon
9914780cba
fix( #1547 ): pass explicit system arguments to for git toplevel and untracked actions
...
* the nice fix
* fix(#1547 ): pass git toplevel cwd unescaped, pass git untracked arguments as per toplevel
Co-authored-by: Maximilian Philipp <philipp@student.tugraz.at>
Co-authored-by: Alexander Courtis <alex@courtis.org>
2022-09-25 12:58:05 +10:00
axlauri
09a51266bc
fix( #1494 ): git showUntracked value and log ( #1504 )
...
* should_show_untracked correctly evaluates status.showUntrackedFiles
* git.Runner:_run_git_job removes nils before logging args
2022-08-15 14:30:22 +10:00
Alexander Courtis
ff6e7966f3
fix( #1484 ): better error handling in git utils get_toplevel
2022-08-07 12:16:03 +10:00
Alexander Courtis
f85b4d9952
chore(git): profile git toplevel and untracked calls ( #1435 )
2022-07-19 17:44:24 +10:00
bstaint
6abc87b1d9
feat: msys2 git support ( #1295 )
2022-05-26 15:22:42 +02:00
Kiyan
0816064a8b
chore: add stylua to format the codebase, and run on CI ( #1055 )
2022-03-06 17:33:30 +01:00
kiyan
4af3104d78
fix(git): properly assign git status to directories
...
fixes #869
fixes #854
2022-02-05 14:42:11 +01:00
Kiyan
6662b60a2b
feat/chore: rewrite git with job and some other fixes ( #743 )
...
* feat/chore: rewrite git with job and some other fixes
* fix: fs clear window, rename echo_warning -> warn
also fix renaming and add an event blocker to avoid running many events
at the same time
2021-11-27 16:02:54 +01:00