Commit Graph

160 Commits

Author SHA1 Message Date
Alexander Courtis
d0ca2dab00 stylua 0.14.0 2022-07-09 11:26:55 +10:00
kiyan
c84735483f feat: add on_tree_resize event 2022-07-06 13:35:29 +02:00
kiyan
70bdf496ea chore: remove quit_on_open from view and use abandon current window 2022-07-04 14:12:56 +02:00
Grzegorz Rozdzialik
40e515df87 fix(view): do not close window when NvimTree buffer is replaced (#1391) 2022-07-04 14:11:42 +02:00
kiyan
19dcacf06e chore: cleanup change dir module 2022-07-03 12:41:13 +02:00
kiyan
3bc2207f4a chore: simplify get_alt_or_next_buf 2022-06-19 09:51:40 +02:00
Alexander Courtis
d9aaa2f985 fix(#1356): view.close switch_buf_if_last_buf prefers alt buf (#1357) 2022-06-19 09:51:01 +02:00
btstream
e82a921baa fix(view): prevent buffer override when actions.open_file.quit_on_open
* fix(view): prevent open buffer on NvimTree window when actions.open_file.quit_on_open is true

* fix(view): add view.quit_on_open function to prevent open on NvimTree window

Co-authored-by: btstream <btstream@gmail.com>
2022-06-18 17:07:24 +10:00
kylo252
1caca62854 feat(view): ability to centralize view on entering (#1310) 2022-06-07 10:09:58 +10:00
kiyan
92ed3c487a fix(view): call get size after setting the height
fixes bottom and top placement for the tree
fixes #1311
2022-06-04 11:56:03 +02:00
kiyan
a0f705995a fix(view): grow condition for left or right was always true for right 2022-05-31 20:25:13 +02:00
Kiyan
2002b21be7 feat(resize): add ability to grow and shrink the tree when drawing (#1293)
Will adapt the view size based on the longest line.
fixes #865
2022-05-31 09:05:00 +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
9d6f4c184b chore: remove custom set local implementation
Seems vim.opt_local has been fixed.
see https://github.com/neovim/neovim/issues/14670
2022-05-21 11:36:07 +02:00
Alexander Courtis
543c07aa7a #1228 close moves focus to previous win on current tab (#1235) 2022-05-07 11:26:22 +02:00
Alexander Courtis
d54fc28045 1221 handle deprecated vert split (#1225) 2022-05-07 11:20:58 +02:00
Alexander Courtis
483f1550d1 Revert "fix: replace vertsplit highlights (#1142) (#1219)" (#1223)
This reverts commit 86d573dad7.
2022-05-01 17:03:44 +10:00
siduck
86d573dad7 fix: replace vertsplit highlights (#1142) (#1219) 2022-04-30 17:47:29 +02:00
kiyan
0b115ac3a7 fix: avoid overriding saved cursors when opening/closing
fixes #1197
2022-04-26 21:21:29 +02:00
Alexander Courtis
74ae97098f #1184 only close the current tabpage (#1188) 2022-04-24 11:15:47 +02:00
Harry Prior
cff5a106b2 feat - add open and close tree events (#1151) 2022-04-18 15:41:21 +02:00
Mauricio Poppe
8340753e26 Preserve cursor position across redraws (#1132) 2022-04-03 14:23:07 +02:00
kiyan
4d8ab7d158 fix: close and reopen file as edit when tree is overriden
fixes #1126
2022-04-02 13:00:20 +02:00
kiyan
5958fd5d06 refacto: use view.resize in view.reposition_window 2022-03-29 19:42:51 +02:00
kiyan
1831417f05 refacto: add get_nodes_starting_line core util 2022-03-26 14:46:44 +01:00
Alexander Courtis
20797a8d74 #1050 #1068 various default options tweaks (#1074) 2022-03-18 11:35:15 +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
d5a12ac9db fix: correct index in movement actions (#1058) 2022-03-09 09:03:22 +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
5cfe768882 fix: resize if size is nil 2022-03-06 14:10:56 +01:00
kiyan
b493e23ed7 fix: wipe buffer before initializing
Buffer was wiped after being created which resulted in trying to setting
buffer options and name to nil buffer.
fixes #1031
2022-03-06 12:00:51 +01:00
Andreas Bissinger
7cb689795e feature: add feature to increase/decrease size (#1048) 2022-03-06 11:33:28 +01:00
Andreas Bissinger
5015e7226c remove tabs (#1047) 2022-03-05 13:38:26 +01:00
kiyan
0e7856fd8d BREAKING_CHANGE: nvim-tree buffer was renamed
You should now use `NvimTree_*` when matching with an autocmd
There is now 1 buffer per tabpage.
2022-03-01 20:58:04 +01:00
kiyan
6af2d5a720 chore: move auto_resize to actions.open_file.resize_window
fixes #1034
2022-03-01 20:07:36 +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
Richard Mathieson
3486c48225 fix: add config for preserving window proportions on open file (#999) 2022-02-22 14:04:14 +01:00
kiyan
f8f297acbf feat: add vinegar abilities to the tree
fixes #860
2022-02-21 21:42:43 +01:00
kiyan
1a5ee2870e fix: fallback to window 0 when winnr is nil in focus
fixes #982
2022-02-15 08:16:42 +01:00
kiyan
ac3f02a83e tempfix: redraw when setting cursor to address a neovim issue
addresses #970
2022-02-14 19:26:55 +01:00
Kiyan
6da7467944 refacto: buffer management, setup fixes, autocmd fixes (#967) 2022-02-14 19:16:45 +01:00
kiyan
36afa32018 chore: move _prevent_buffer_override in entry file 2022-02-11 10:11:59 +01:00
kiyan
5744c469a6 fix(temporary): defer colors setup and hijack window
lazy loading + opening will close the window. Need to find a fix for
this.
fixes #947
2022-02-09 21:01:02 +01:00
kiyan
879049ac03 fix: create buffer during setup schedule
and move view setup before setup schedule
Fixes #951
2022-02-09 19:29:43 +01:00
kiyan
f183c7f311 chore: move last autocmds from view to entrypoint 2022-02-08 20:56:02 +01:00
boppyt
230a61db91 fix: disable highlighting 'number' when CursorLine is enabled (#941) 2022-02-07 18:27:13 +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
5697dc4fcf fix: typo in view for focused file
fixes #782
2022-02-05 14:04:58 +01:00
kiyan
14461373e0 refacto: move all keybind logic to actions/init 2022-01-21 12:21:23 +01:00