kiyan
5e900c2f29
refacto: tree explorer root should be absolute_path not cwd
2022-05-29 11:40:06 +02:00
emmanueltouzery
3806653d75
new option: close windows displaying removed files ( #1300 )
2022-05-29 11:23:01 +02:00
Kiyan
3a95c5a9cf
feat(actions): expand all under folder ( #1292 )
2022-05-29 11:15:32 +02:00
Alexander Courtis
3ba383d591
chore/remove globals ( #1279 )
...
* remove renderer globals: nvim_tree_add_trailing nvim_tree_highlight_opened_files nvim_tree_root_folder_modifier nvim_tree_special_files
* remove renderer globals: nvim_tree_icon_padding
* remove renderer globals: nvim_tree_symlink_arrow
* remove renderer globals: nvim_tree_show_icons, nvim_tree_show_icons
* remove renderer globals: nvim_tree_git_hl
* remove renderer globals: nvim_tree_group_empty
* remove renderer globals: respect_buf_cwd
* remove renderer globals: nvim_tree_create_in_closed_folder
* remove globals: consistency in legacy checks
* remove renderer globals: nvim_tree_special_files
* renderer.icons.symbols -> glyphs
2022-05-28 11:08:40 +10:00
kiyan
540c811cb2
fix(open file): do not trigger buf enter event when setting target win
...
Fixes #1288
Also starts a refactoring of the open-file code, to make it easier to
debug and improve.
2022-05-26 13:37:50 +02:00
kiyan
73ab312820
refactor: simplify opening file in new tab
...
fixes #1271 . Also fixes opening a file in new tab when close_on_open was
true.
This introduces breaking change since we don't do any extra behavior
and let the buffer be opened by the tree.
The previous behavior was a bit old and i believe this should've been
fixed by now.
Reference this commit if unexpected behavior appears while opening files
in new tabs from nvim-tree.
2022-05-21 12:09:09 +02:00
Kiyan
6343813a35
feat(live-filter): add ability to live filter out nodes in the tree ( #1056 )
2022-05-17 10:03:49 +02:00
Michael
46014449b6
refactor: use lua api for user commands and autocommands ( #1206 )
...
BREAKING: plugin now requires nvim-0.7
2022-05-14 09:49:45 +02:00
Alexander Courtis
82ec79aac5
#1216 show diagnostic signs on all folders ( #1244 )
2022-05-10 11:22:11 +10:00
kiyan
82a646225f
fix(parent node): do not close folder when should_close is false
2022-05-08 13:30:57 +02:00
Kiyan
d8aad37997
fix(close-node): do not close parent when current node is open ( #1239 )
2022-05-08 11:38:05 +02:00
kiyan
ec888d08ce
fix(open file): set target win when opening new file
...
fixes #1214
Still this is a patch that is not really great. This code should be
rewritten.
2022-05-07 12:16:26 +02:00
Kiyan
db873b340d
chore(diagnostics): move updates to renderer ( #1218 )
...
should address #1216
2022-05-07 11:14:32 +02:00
kiyan
428898154f
chore: lib can be required directly in movements.lua
2022-04-30 16:41:26 +02:00
Kiyan
3ac443207f
#1166 validate config ( #1195 )
2022-04-26 21:11:24 +02:00
Andreas Bissinger
a94f5bf776
fix: correct line when moving in tree ( #1200 )
2022-04-26 21:10:27 +02:00
kiyan
09a47aed8d
Revert " #1166 validate user's options ( #1177 )"
...
This reverts commit 5bbd3a0a91 .
2022-04-24 14:41:48 +02:00
Alexander Courtis
5bbd3a0a91
#1166 validate user's options ( #1177 )
2022-04-24 11:17:05 +02:00
Alexander Courtis
2c71ffcc0d
add actions.change_dir.restrict_above_cwd ( #1171 )
2022-04-23 10:45:23 +02:00
kiyan
95a5c2d4bc
fix: add parent ref to nodes
...
also refactor movement go to parent
fixes #1148
2022-04-21 20:39:14 +02:00
Alexander Courtis
0f0f858348
#1157 update lsp diagnostics when the tree state is changed ( #1174 )
2022-04-18 15:46:42 +02:00
Andreas Bissinger
9066cbf3f7
feat: add file completion ( #1163 )
2022-04-18 15:36:55 +02:00
Tony Shen
477536cd7e
fix: fix mis-naming for system clipboard config ( #1160 )
2022-04-12 22:12:13 +02:00
Michael
9c272b97bc
fix: trash filenames with spaces ( #1156 )
2022-04-11 12:28:51 +02:00
Michael
fc925d814a
fix: add spaces to prompts and blankline to rename output ( #1154 )
2022-04-11 09:47:23 +02:00
Michael
6e0e70b1ca
feat: delete preview buffers #1145 ( #1149 )
2022-04-10 17:23:37 +02:00
Lò [By The Way]
83fe370d52
Added actions.opts.use_sys_clipboard, [issue: 789 ] ( #1141 )
2022-04-10 15:39:36 +02:00
Pedro Castro
deb1f253f4
fix(statusline): better window picker highlight ( #1139 )
2022-04-09 14:56:22 +02:00
kiyan
618ea25613
fix: clear prompt when creating file
...
fixes #1138
2022-04-06 13:37:17 +02:00
Alexander Courtis
62906f095b
fix: collapse exit early if nvim-tree not loaded ( #1128 )
2022-04-02 12:40:59 +02:00
Alexander Courtis
cc387e8314
Merge pull request #1107 from kyazdani42/#1099-search-obey-ignored
...
#1099 search obeys active ignore filters
2022-03-27 13:48:02 +11:00
kiyan
1831417f05
refacto: add get_nodes_starting_line core util
2022-03-26 14:46:44 +01:00
Alexander Courtis
54c78dbca2
#791 add profiling for some operations ( #1108 )
2022-03-26 13:22:28 +01:00
Alexander Courtis
015234e032
#837 find file symlinks fixes ( #1093 )
2022-03-26 13:17:34 +01:00
Alexander Courtis
54c7cdbabb
#1099 search obeys active ignore filters
2022-03-26 12:51:18 +11:00
baahrens
7b0ebf8b17
feat: Use vim.ui.input for rename and create ( #1097 )
2022-03-22 20:28:58 +01:00
Gary Sentosa
57d6f70952
fix: window picker bug on global statusline ( #1098 )
2022-03-22 20:14:53 +01:00
kiyan
e87ee0e3c3
chore: license open-file as MIT
2022-03-20 13:36:21 +01:00
Alexander Courtis
fc70954ec7
#837 search subdirs ( #1092 )
2022-03-20 13:26:56 +01:00
kiyan
3cf67c5849
fix: remove diagnostics in help view
...
fixes #1088
2022-03-19 12:32:11 +01:00
Alexander Courtis
20797a8d74
#1050 #1068 various default options tweaks ( #1074 )
2022-03-18 11:35:15 +01:00
Andreas Bissinger
e307ad9e3d
feat: open node when using search-node action ( #1082 )
2022-03-18 11:32:08 +01:00
Alexander Courtis
a50fd77c99
#857 add filter_custom action, filter_ignored->filter_git_ignored ( #1077 )
2022-03-18 11:30:30 +01:00
Alexander Courtis
b136c7b6f9
#1064 add copy_paste logging and more error copy-paste error handling ( #1076 )
2022-03-18 11:27:03 +01:00
kiyan
2457e141ae
fix: do not crash file-popup when node is root dir
2022-03-09 23:07:31 +01:00
kiyan
5af3cfa170
fix: split if nvim-tree is the only window
...
also fix resize when trying to open but the buffer exists
2022-03-09 22:29:26 +01:00
kiyan
471afc13fe
refacto: abstract TreeExplorer in core.lua
2022-03-09 22:01:54 +01:00
kiyan
144bce74a5
refacto: move renderer git into file
...
also view.is_root_folder_modifier_visible don't take the tree as
parameter
2022-03-09 21:32:15 +01:00
Andreas Bissinger
60a9c86c53
feat: make it possible to collapse the tree but keep the directories open which are in used in buffers ( #1057 )
2022-03-09 11:08:29 +01:00
Andreas Bissinger
d5a12ac9db
fix: correct index in movement actions ( #1058 )
2022-03-09 09:03:22 +01:00
Alexander Courtis
19075f41e8
File logging ( #1053 )
...
* add file logging infrastructure
* log git runner operations
* log configuration and mappings
* document file logging infrastructure
* style fixes
* stylua fixes
* document log file locations
2022-03-07 08:44:37 +01:00
Kiyan
0816064a8b
chore: add stylua to format the codebase, and run on CI ( #1055 )
2022-03-06 17:33:30 +01:00
kiyan
76d181d480
refacto: move filters and sorters in their own modules
...
Also exclude filters is taken into account in git ignore
fixes #892
2022-03-06 14:14:56 +01:00
Andreas Bissinger
c25be06612
feat: close file info popup if on same node ( #1054 )
2022-03-06 13:07:12 +01:00
Andreas Bissinger
ceadf83809
feat: add file size in popup ( #1049 )
2022-03-06 11:26:35 +01:00
Grzegorz Rozdzialik
ac858a28a2
fix(run-command): handle current directory node ( #1046 )
...
Handle the node representing the current directory (the topmost node in
the nvim-tree window). That node does not have the `absolute_path` set.
Use `TreeExplorer.cwd` instead, similar to the logic in `change-dir`.
2022-03-04 13:02:42 +01:00
kiyan
a3f256dc1b
fix(find-file): match folders with prefix, not containing the node
...
avoid opening folders matching part of the string (/dev matching
/home/dev for instance)
2022-03-03 23:56:29 +01:00
smhc
f6aba661ec
Close help on q/close instead of ignore keypress ( #1043 )
...
Co-authored-by: Shane Hird <shane.hird@csgicorp.com>
2022-03-03 23:43:14 +01:00
Andreas Bissinger
50a927f176
feat: add popup information ( #1042 )
2022-03-03 21:13:10 +01:00
Andreas Bissinger
4fedb93cec
feat: add new keybinding "b" to run a command in the focused node ( #1024 )
2022-03-03 09:05:03 +01:00
kiyan
38cc6305b4
fix: forgot resize_window option in open-file setup
2022-03-01 21:11:11 +01:00
kiyan
6af2d5a720
chore: move auto_resize to actions.open_file.resize_window
...
fixes #1034
2022-03-01 20:07:36 +01:00
Andreas Bissinger
9ec710e338
remove semicolons ( #1035 )
2022-03-01 19:57:05 +01:00
Andreas Bissinger
1b8757e530
fix: changed search_node action to determine correct index ( #1022 )
2022-03-01 19:56:43 +01:00
Alexander Courtis
3d8912ca53
add more sensible defaults for window_picker.excludes ( #1027 )
2022-02-28 21:33:24 +01:00
Alexander Courtis
ce3604d33c
#972 bug: prev_git_item with hijack_cursor selects icon instead of previous file ( #1025 )
2022-02-28 21:31:23 +01:00
Andreas Bissinger
48e76bc031
feat: Add a new keybinding to search and expand a certain path ( #1014 )
2022-02-22 23:36:59 +01:00
kiyan
19346da6e1
fix: abandon window and bufnr before editing file
...
fixes a vinegar mode issue
2022-02-22 21:45:37 +01:00
Grzegorz Rozdzialik
0fcd6614b5
feat: allow not changing the cwd when changing directories ( #1019 )
2022-02-22 21:39:12 +01:00
kiyan
2898c4d58f
hotfix: avoid duplicates when finding file
...
fixes #1018
2022-02-22 10:56:33 +01:00
kiyan
69867f4a00
chore: move window picker configuration in setup
2022-02-21 22:19:35 +01:00
kiyan
f8f297acbf
feat: add vinegar abilities to the tree
...
fixes #860
2022-02-21 21:42:43 +01:00
kiyan
f977e5c05a
refacto: make git module interface to wait for job to finish
...
allows simplify the explore/reload/find/initialization by making the
whole code synchronous. No more callback needed.
2022-02-21 19:12:16 +01:00
Andreas Bissinger
9f3dc98de7
feat: Add a new keybinding "W" to collapse the whole tree ( #1013 )
2022-02-21 13:46:55 +01:00
kiyan
58b81ed9e6
refacto: remove rendering from lib.init
2022-02-20 23:01:25 +01:00
kiyan
9008bac180
hotfix: force redraw when changing directory
2022-02-20 22:23:37 +01:00
kiyan
527d88d54e
refacto: simplify interface of reload and explore
...
also make common group empty check in explorer utils
2022-02-20 15:08:36 +01:00
wongxy
41f51508e3
fix: use "" as flag to remove default mappings ( #1011 )
2022-02-20 11:29:09 +01:00
Alexander Courtis
44ffcb6f4b
#998 allow users to unmap keys, remove user keys from default multi key maps ( #1000 )
2022-02-19 16:50:27 +01:00
Alexander Courtis
070a57a195
#973 copy action_cb for view.mappings.custom_only ( #997 )
2022-02-19 16:44:26 +01:00
kiyan
44489380a8
fix: multiple find-file triggered at the same time duplicates files
2022-02-17 16:09:45 +01:00
Lopi-py
5f047bc5f9
fix: close windows properly ( #924 )
2022-02-17 08:19:42 +01:00
Kiyan
d34ea42254
fix: find file waits for git to finish ( #976 )
2022-02-15 08:22:56 +01:00
kiyan
ad2802d9c4
fix: do not update cwd when changing window
2022-02-14 19:43:57 +01:00
Kiyan
6da7467944
refacto: buffer management, setup fixes, autocmd fixes ( #967 )
2022-02-14 19:16:45 +01:00
Kiyan
3f4ed9b6c2
fix: reload git status of existing nodes ( #975 )
2022-02-13 13:44:09 +01:00
kiyan
95c331ce32
fix: revert git item movement direction
...
fixes #971
2022-02-13 12:16:55 +01:00
kiyan
0f7da146bf
chore: add guards to prepare setup refactoring
2022-02-11 11:06:11 +01:00
Steve Vermeulen
da59247db9
Fixed some trailing slash bugs ( #957 )
...
* Fixed issue where user would have to trigger dir-up action multiple times to get it to work
* Fix to path_join to ensure the result does not have a double slash
2022-02-10 08:56:05 +01:00
kiyan
525042317e
fix: lint issues
2022-02-09 22:29:34 +01:00
kiyan
4fc9cb1da3
chore: move code around
...
- deprecate config.lua file
- move icon config code into renderer/icons
- move file opening config in open-file.lua
2022-02-09 22:26:02 +01:00
kiyan
ea92e7bf7c
refacto: set tree explorer in the global state
...
also remove the redraw method and use renderer.draw immediately
2022-02-07 22:07:08 +01:00
kiyan
47ccc2913f
refacto: move toggle help and filter toggles into actions
...
also fix explorer to properly remove element on update when filter is
applied
2022-02-07 20:43:24 +01:00
kiyan
7fec0f658b
chore: simplify reloader and start fixing group nodes refresh
2022-02-06 22:59:37 +01:00
Guilherme Rodz
7d33b0f74a
fix: Delete a file as an open buffer ( #939 )
2022-02-06 22:30:46 +01:00
kiyan
923e034668
refacto: sort actions declaration, remove close from main file
...
fixes #921
- use view.close instead of nvim-tree.close
- put preview code inside the execution logic on keypress
- sort keys in keypress_funcs
- remove empty buffer when hijacking window
2022-02-06 19:25:23 +01:00
kiyan
8a6c7bae3a
refacto: move code ton explorer and simplify some internal apis
2022-02-06 17:58:24 +01:00
kiyan
8b27fd4e61
refacto: move target_winid outside of tree
2022-02-06 17:03:23 +01:00
kiyan
74791bb624
refacto: split explorer module into multiple files
2022-02-06 17:01:18 +01:00
kiyan
7829d7c7cf
refacto: move set_index_and_redraw -> actions.find-file.fn
2022-02-06 16:32:44 +01:00
kiyan
23c95a674f
chore: move refresh/reloaders into actions.reloaders
2022-02-06 16:24:14 +01:00
kiyan
1fe29f8eef
chore: move g:nvim_tree_quit_on_open into open_file action config
2022-02-05 18:42:08 +01:00
kiyan
4a9e53143b
refacto: ubiquitous language renaming
...
BREAKING
- rename all 'entry' to 'node' or '_node' if shadowing
- rename all 'entries' to 'nodes'
2022-02-05 18:10:09 +01:00
kiyan
f74dd24c58
refacto: move some code into actions
...
(non breaking, old assignments link to new assignments)
- move lib.collapse-all into actions/collapse-all
- move lib.dir-up into actions/dir-up
- move lib.change-dir into actions/change-dir
- use setup option for change-dir global (and use the old option for
setup)
2022-02-05 17:42:40 +01:00
kiyan
95e3aacc01
chore: reindent sibling function
2022-02-05 17:13:51 +01:00
kiyan
3936829088
fix(file creation): containing folder offset in input
2022-02-05 17:12:05 +01:00
kiyan
8c4fd519b6
chore(refacto): move parent and sibling functions into actions
...
BREAKING CHANGE:
- move parent_node and sibling functions from lib to
actions/movements.lua.
2022-02-05 17:08:11 +01:00
kiyan
52dd0402de
chore: extract functions initialization in create-file
2022-02-05 13:57:13 +01:00
kiyan
192b2266f7
fix: synchronous file creation
...
allows cursor to be set when finishing
fixes #806
2022-02-05 13:01:37 +01:00
kiyan
9880c22ace
fix: do not error out when opening with swapfile
...
fixes #880
2022-02-05 12:42:22 +01:00
Raafat Turki
6eebc10ed8
fix(actions) trashing ( #916 )
2022-01-31 09:04:48 +01:00
kiyan
b5c2e52ed0
fix(actions): help, close and custom only
...
fixes #908
2022-01-21 15:56:29 +01:00
kiyan
da302ea3b1
fix(actions): remove nvim_tree_callback from edit_no_picker
2022-01-21 12:37:47 +01:00
Sander van Harmelen
14bdf134f9
Add a mode that allows edit without the picker ( #873 )
2022-01-21 12:36:28 +01:00
kiyan
14461373e0
refacto: move all keybind logic to actions/init
2022-01-21 12:21:23 +01:00
kiyan
2b2bf0721d
refacto: move keypress to actions/init
2022-01-21 12:07:54 +01:00
kiyan
4d22f9487d
refacto: move open-file to actions
...
move all logic to open file from lib to actions/open-file
2022-01-21 12:01:17 +01:00
kiyan
dc5eae6512
refacto: remove fs folder and move code to actions
...
- remove file moved to actions.remove-file.lua
- rename file moved to actions.rename-file.lua
2022-01-21 11:54:35 +01:00
kiyan
45671e94be
refacto: extract create_file into actions module
2022-01-21 11:45:52 +01:00
kiyan
1248bcec86
refacto: create actions folder and move some code to it
...
- move trash.lua into actions
- move system-open from root file to actions
- move copypasta code from fs to actions
- add file_exists in utils
- add rename_loaded_buffers in utils (might need to move that in the
future).
2022-01-21 11:25:49 +01:00