Commit Graph

27 Commits

Author SHA1 Message Date
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
Azad
4054fc4be3
refactor: format tables line by line for better readability (#2456)
* Format tables line by line for better readability

* Forgot a comma

---------

Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-10-14 18:07:28 +11:00
Asror
3cc698b35b
feat(#2270): add notify.absolute_path - show file or absolute path (default) names with notifications (#2286)
Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-06-25 13:06:21 +10:00
Svetlozar Iliev
c3c6544ee0
feat(event): add WillCreateFile, WillRemoveFile (#2273)
node. These are mostly going to be useful for implementing lsp file
operation actions.

Co-authored-by: Alexander Courtis <alex@courtis.org>
2023-06-19 10:00:55 +10: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
yioneko
16f2806d59
fix: remove redundant file existence check in create file operation (#1936) 2023-01-23 15:12:45 +11:00
Eric Haynes
7177d95ac0
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>
2022-12-11 14:40:38 +11:00
Alexander Courtis
b17358ff4d
fix(#1731 #1723 #1716): handle all external file system changes (#1757)
* fix(#1731): watcher refreshes node rather than the first node matching absolute path, profile refresh

* fix(#1731): reload explorer reloads closed folders

* fix(#1731): do not fire folder created event on file create

* fix(#1731): reload profile absolute path, not link to

* fix(#1731): find-file locks/profiles on real path, reloads when watchers disabled

* Revert "fix(#1731): reload explorer reloads closed folders"

This reverts commit 5dfd8bd2fa.

* fix(#1731): tidy watch reload

* fix(#1731): move refresh_node from watch to reload

* fix(#1731): find-file reloads all nodes for the containing directory

* fix(#1731): create-file refreshes synchronously

* fix(#1731): remove unused watch node

* fix(#1731): find-file refreshes root

* fix(#1716): create-file invokes find-file

* fix(#1731): refresh path walks down the tree to the targedt
2022-11-26 14:19:09 +11:00
Alexander Courtis
7e892767bd Revert "fix(#1716): focus file/directory when created in a sub-directory, don't dispatch FolderCreated on file creation (#1722)"
This reverts commit bdc4ec6abd.
2022-11-06 13:32:24 +11:00
Alexander Courtis
8cc369695b
fix: replace vim.* "requires" with explicit calls to vim functions (#1701) 2022-11-06 10:37:33 +11:00
Alexander Courtis
bdc4ec6abd
fix(#1716): focus file/directory when created in a sub-directory, don't dispatch FolderCreated on file creation (#1722)
* fix(#1716): focus file/directory when created in a sub-directory, don't dispatch FolderCreated on file creation

* fix(#1716): focus file/directory when created in a sub-directory

* fix(#1716): focus file/directory when created in a sub-directory
2022-11-06 10:08:32 +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
kiyan
3d58a9b2cf fix(fs): create file failure when reloading watch path for node
because node can be a file or a symlink.
fixes #1633
2022-10-08 16:11:34 +02:00
Alexander Courtis
be2b4f58e6
fix(#1615): focus created file when command line prompt requires confirmation (#1622)
* fix(#1615): focus created file when command line prompt requires confirmation

* fix(#1615): focus created file when command line prompt requires confirmation
2022-10-08 14:26:31 +11:00
Alexander Courtis
ac8d259bad fix(prompt): add select_prompts to suit UI decorator plugins such as dressing and telescope 2022-09-22 13:23:49 +10:00
Carlos Castillo
b314b3a699
fix(#1500): focusing directories with a trailing slash in their path doesn't work (#1501) 2022-08-14 15:00:04 +10:00
kiyan
e632ac7c81 fix(create-file): when node is nil, create the file at root
fixes #1467
2022-07-27 09:33:01 +02:00
John Fred Fadrigalan
d927e89aa9
refactor(actions): remove linefeed on info messages. (#1450) 2022-07-22 10:10:58 +02:00
kiyan
8dc2144e87 refactor: use vim.ui.input for y/n selections
also add clear_prompt again.
fixes #1441
2022-07-19 11:31:09 +02:00
kiyan
ba5c18dc2b feat: add confirmation kind to select y/n 2022-07-18 14:38:32 +02:00
kiyan
1018a83e10 fix(create-file): pass file in parameter 2022-07-18 14:34:10 +02:00
kiyan
1ee6a3ea65 feat(create-file): use vim.ui.select for confirmation
fixes #1434
fixes #1294
2022-07-18 14:32:19 +02:00
kiyan
18447132fc feat(notify): switch all print/nvim_*write statements to utils.notify 2022-07-18 14:04:48 +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
kiyan
078a9e5bf9 chore: move focus_file to utils 2022-07-11 16:55:33 +02:00
kiyan
0fa2ec1950 fix(actions): create file should defer more to focus 2022-07-11 09:49:10 +02:00
Kiyan
831f1158c3
refactor(actions): move actions into semantic modules (#1410) 2022-07-10 09:47:52 +02:00