Commit Graph

95 Commits

Author SHA1 Message Date
Kiyan
6da7467944 refacto: buffer management, setup fixes, autocmd fixes (#967) 2022-02-14 19:16:45 +01:00
kiyan
0f7da146bf chore: add guards to prepare setup refactoring 2022-02-11 11:06:11 +01:00
eightpigs
c226eaf0bf fix: bufnr is nil when incomplete setup. (#955)
fixes #947
2022-02-10 19:07:59 +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
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
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
Munif Tanjim
7b64075bdf fix: close_node (#931) 2022-02-05 23:09:50 +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
10b4a97f7f fix: check type callback is function in refresh
fixes #930
2022-02-05 17:51:18 +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
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
96650c801f BREAKING: rename populate -> explorer
- rename populate.lua to explorer.lua
- rename refresh_entries to refresh in explorer.lua
- rename populate to explore in explorer.lua
2022-02-05 16:56:42 +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
Lopi-py
99d65afd6e fix: update diagnostic icon when a node is closed 2022-02-01 09:17:09 +01:00
Pavel
0bc8258529 fix: parent_node offset when hide_root_folder is true (#912) 2022-01-31 09:17:40 +01:00
Sander van Harmelen
1ac3502290 Add a config option to use :cd instead of :lcd (#874)
Fixes #829
2022-01-21 12:29:30 +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
0a2f6b0b6b fix(dirchange): do not change dir when switching windows
- Avoid changing dir when switching windows, except when
changing tabpage.
- Load nvim-tree with passed directory when opening with `nvim DIR`

Fixes #858 #720
2021-12-24 14:50:20 +01:00
Sergey Kuznetsov
fd87c240df Fix redrawing tree when not inside git repo (#836) 2021-12-12 12:25:15 +01:00
eightpigs
e84828806c fix: NvimTree does not open the file when it is open standalone (#815) 2021-12-05 22:32:08 +01:00
Munif Tanjim
97f0039149 fix: close_node behavior on file (#799) 2021-11-28 14:14:42 +01:00
Kiyan
6662b60a2b feat/chore: rewrite git with job and some other fixes (#743)
* feat/chore: rewrite git with job and some other fixes

* fix: fs clear window, rename echo_warning -> warn

also fix renaming and add an event blocker to avoid running many events
at the same time
2021-11-27 16:02:54 +01:00
kiyan
a6c1d45dd6 chore: refacto populate filtering
move `nvim_tree_ignore` and `nvim_tree_hide_dotfiles` to setup
2021-10-30 12:25:09 +02:00
M.A
fd3969ec98 feat: add hide_root_folder (#728) 2021-10-24 16:48:57 +02:00
Yehya Elmasry
5014f59585 Fix tree refreshing logic (#739) 2021-10-23 15:35:46 +02:00
Justin
9f90be7b67 fix: escape directory name before cd-ing (#725) 2021-10-16 17:43:22 +02:00
kiyan
86e6dc627e chore: move help rendering in its own file 2021-10-10 11:48:02 +02:00
kiyan
a51795946e fix: remove change_dir window event check
fixes #673. Not sure why this check was added in the first place, but
some testing made me realize maybe it wasn't useful.
2021-10-09 10:54:43 +02:00
kiyan
618286b726 fix: get_node_at_line for group nodes 2021-10-08 20:01:09 +02:00
kiyan
fb32f35d7f chore: allow configuring height
also fixes window management for top and bottom tree side
2021-10-03 14:13:10 +02:00
kiyan
8fe2b547ac feat: add lib.collapse_all function 2021-10-03 12:58:08 +02:00
kiyan
8dbba0c2c9 fix: avoid running the buf respect cwd on every open 2021-10-02 13:13:55 +02:00
kiyan
c0cd3aeb65 fix: do not run refresh if tree cwd is nil 2021-09-30 13:11:05 +02:00
kiyan
acfb3c0bfb fix: do not refresh tree to only redraw 2021-09-30 13:02:20 +02:00
kiyan
1edebb7894 chore: lsp diagnostics setup 2021-09-26 11:56:44 +02:00
kiyan
84126d3eb5 fix: retrieve last group node when iterating for siblings or parent 2021-09-12 14:04:41 +02:00
Uy Ha
5bca2006cc Make time between each tree refresh configurable (#599) 2021-08-30 18:53:14 +02:00
kiyan
d705feda5a fix: fs refresh override refresh clock 2021-08-28 14:52:10 +02:00
kiyan
0a178d17bc fix: double entries and wrong cursor value when using mksession 2021-08-28 10:06:36 +02:00
Khang
c75e4a63b7 fix: respect_buf_cwd #567 (#583) 2021-08-21 12:04:44 +02:00
Yusuke Uchida
143505b281 Added new option, respect_buf_cwd (#533) 2021-08-07 09:59:42 +02:00
kiyan
cf9582962f fix: add refresh guard mecanism to avoid doing too many updates 2021-07-20 00:05:03 +02:00
kiyan
42b23246bc fix: do not redraw git on each folder when updating 2021-07-19 22:26:08 +02:00
kiyan
f178c8c8c5 run nvim tree refresh on neogit status change 2021-07-10 14:25:21 +02:00
Andrew Wong
64aacb67ab fix: don't populate git status when git unused (#499) 2021-07-10 10:05:53 +02:00
kiyan
768788476e chore(async): schedule git on refresh 2021-06-30 19:47:34 +02:00