Commit Graph

120 Commits

Author SHA1 Message Date
Krzysztof Cieśla
ce5d0a6b7d
fix(#1543): Do not resize nvim-tree window if float is enabled (#1556)
Co-authored-by: Krzysztof Cieśla <krzysztof.marcin.ciesla@cern.ch>
2022-08-27 13:36:26 +10:00
Alexander Courtis
c3ea264947
feat(view): allow function for view.float.open_win_config (#1538) 2022-08-23 17:14:23 +10:00
Alexander Courtis
e3353c4cb4
fix(#1529): ensure tree window exists before closing (#1537) 2022-08-22 16:58:41 +10:00
Alexander Courtis
d9edddb849
fix(#1503): focus last win before close (#1509) 2022-08-20 14:32:28 +10:00
Krzysztof Cieśla
7323c81bd6
feat(view): Floating nvim tree window #1377 (#1462)
* Simple mock-up of floating nvim-tree window

* Passing whole table to nvim_open_win()

* Run update-help.sh

* Use vim.api alias

* Add comment to float options

* Added `anchor` to float options

* Enabling float window enforces `actions.open_file.quit_on_open`

* Added documentation

* add view.float.open_win_config, skipping validation

* Made nvim-tree window closes when float is enabled

* Close nvim-tree window when out of focus

* Update help

Co-authored-by: Krzysztof Cieśla <krzysztof.marcin.ciesla@cern.ch>
Co-authored-by: Alexander Courtis <alex@courtis.org>
2022-08-06 15:40:07 +10:00
Kiyan
64cc3c17e1
feat(mapping): deprecate user mappings and add on_attach (#1424) 2022-07-26 11:09:39 +02:00
FotiadisM
1e3c578eeb
fix: count unicode codepoints instead of bytes (#1445) 2022-07-20 23:05:44 +02:00
kiyan
ec530e73be fix(wipe): wipe all nvim-tree rogue buffers
also prevent find_file if bufnr is not valid
fixes #1438
2022-07-18 13:29:56 +02:00
Kiyan
831f1158c3
refactor(actions): move actions into semantic modules (#1410) 2022-07-10 09:47:52 +02:00
Alexander Courtis
fd562ede63
fix(#1406): allow nvim-tree.renderer.icons.show.folder_arrow
* fix(#1406): allow nvim-tree.renderer.icons.show.folder_arrow when not folder

* fix(#1406): allow nvim-tree.renderer.icons.show.folder_arrow when indent markers enabled

* fix(builder): highlight first iteration for arrow column

* fix stylua

Co-authored-by: kiyan <yazdani.kiyan@protonmail.com>
2022-07-10 12:14:18 +10:00
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