Alexander Courtis
c3d9b1779f
docs: notify users with a fs.inotify.max_user_watches message on EMFILE event ( #3028 )
...
* docs: notify users with a fs.inotify.max_user_watches message on EMFILE event
* type safety for newly created vim.v.event type
2024-12-13 10:39:46 +11: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
Alexander Courtis
53b0bcaada
chore: stylua column width 120 -> 140 ( #2448 )
...
* chore: stylua column width 120 -> 140
* chore: stylua column width 120 -> 140, tidy
* Revert "chore: stylua column width 120 -> 140, tidy"
This reverts commit 8a0524d6bd .
* chore: stylua column width 120 -> 140, tidy watcher.lua
* chore: stylua column width 120 -> 140, tidy diagnostics.lua
* chore: stylua column width 120 -> 140, tidy git.lua
* chore: stylua column width 120 -> 140, tidy open-file.lua
* chore: stylua column width 120 -> 140, tidy system-open.lua
* chore: stylua column width 120 -> 140, tidy runner.lua
2023-10-08 11:40:58 +11:00
Alexander Courtis
d4f6d33496
fix( #2240 ): disable watchers following EMFILE ( #2268 )
...
* fix(#2240 ): disable watchers following EMFILE
* fix(#2240 ): disable watchers following EMFILE
2023-06-18 11:42:48 +10:00
Alexander Courtis
1b13a49f91
fix( #1916 ): suppress EPERM watcher failures on windows ( #1919 )
2023-01-16 13:00:57 +11:00
gegoune
3ce0a8e770
feat(git): support DA state, fix( #1822 ): test directory capable of watching before presenting it ( #1905 )
...
* fix(#1822 ): test directory capable of watching before presenting it (#1901 )
* feat(git): support `DA` state
Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-01-10 13:32:53 +11:00
Alexander Courtis
d949af7245
fix( #1804 ): do not refresh watched nodes that have been destroyed (deleted)
2022-12-19 14:36:42 +11:00
Alexander Courtis
bcb2a5a80d
fix( #1720 ): .git watch only FETCH_HEAD, HEAD, HEAD.lock, config, index ( #1732 )
...
* fix(#1720 ): .git watch only HEAD, config and index
* fix(#1720 ): .git watch only FETCH_HEAD, HEAD, HEAD.lock, config, index
2022-11-12 14:38:33 +11:00
Alexander Courtis
8cc369695b
fix: replace vim.* "requires" with explicit calls to vim functions ( #1701 )
2022-11-06 10:37:33 +11:00
Tomohiro Endo
6d6a44626d
fix(watcher): failure on watcher teardown message ( #1726 )
2022-11-06 10:30:12 +11:00
Alexander Courtis
a0f3e99b2d
feat(watcher): tear down watcher on failue, warning the user ( #1707 )
2022-11-05 10:25:14 +11:00
kylo252
6ca6f99e76
feat(notify): add notify.threshold ( #1693 )
...
* feat: configurable notification level
add `notify.threshold` to setup opts
* feat: configurable notification level: add threshold example doc
* feat: configurable notification level: log always comes last
Co-authored-by: Alexander Courtis <alex@courtis.org>
2022-11-01 10:24:40 +11:00
Alexander Courtis
eff1db341c
chore(watchers): Watcher shares single fs_event from Event, node watchers use unique path prefixed debounce context ( #1453 )
2022-07-26 10:43:58 +02:00
kiyan
21fadc1f38
chore: move nvim-tree.utils.warn -> notify.warn
...
add notify.error and notify.info
2022-07-18 13:46:11 +02:00
Alexander Courtis
06e48c29c4
chore(watchers): refactor events and make debouncer safe
...
- fs poll -> fs events
- make debouncer safe and fix diagnostics events
2022-07-17 08:50:24 +02:00
Alexander Courtis
e401a4c957
feat(watcher): debounce FS watchers
2022-06-28 11:18:22 +10:00
Kiyan
e6c1b4cd5b
chore(setup): make setup idempotent ( #1340 )
...
Co-authored-by: Alexander Courtis <alex@courtis.org>
2022-06-26 12:14:03 +02:00
Kiyan
b0d27c09b6
feat(explorer): add filesystem watchers ( #1304 )
...
* feat(explorer): add experimental watchers
This commit introduces watchers to update the tree.
This behavior is introduced behind an "filesystem_watchers" option
which should prevent instabilities.
It will become the default at some point.
Co-authored-by: Alexander Courtis <alex@courtis.org>
2022-06-05 12:39:39 +02:00