Commit Graph

643 Commits

Author SHA1 Message Date
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
b54de4b48a doc(readme): update requirement from 0.5 to 0.6 2022-02-09 22:37:38 +01:00
kiyan
a979e3b245 chore: simplify readme 2022-02-09 22:35:06 +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
Steve Vermeulen
4ec8c9f364 Added a new option auto_reload_on_write to allow users to disable it for performance reasons (#956) 2022-02-09 21:06:07 +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
f938bcb3ae fix: cleanup all dirs when hijacking window 2022-02-08 22:04:13 +01:00
kiyan
e5aff47940 fix: schedule view setup to allow session to load
Fixes #591
2022-02-08 21:53:47 +01:00
kiyan
c8aa3c3e40 fix: clear buffer when hijacking if view bufnr is already defined
Allows clearing buffer dir properly on startup
2022-02-08 21:51:56 +01:00
kiyan
7a19c3e747 fix: reschedule on_enter and setup autocmd
Wait for nvim to finish before checking buftypes.
Fixes #944
Fixes #942
2022-02-08 21:42:14 +01:00
kiyan
92a64daf27 fix: normalize cwd with '..' 2022-02-08 21:36:46 +01:00
kiyan
d8bf1adcdc fix: update neovim path when nvim is opened with nvim dir
fixes #945
2022-02-08 21:02:22 +01:00
kiyan
f183c7f311 chore: move last autocmds from view to entrypoint 2022-02-08 20:56: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
e42a4337d0 fix: do not group empty at root 2022-02-07 21:16:59 +01:00
kiyan
1ab7812c62 fix: properly reload nodes 2022-02-07 20:54:26 +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
boppyt
230a61db91 fix: disable highlighting 'number' when CursorLine is enabled (#941) 2022-02-07 18:27:13 +01:00
kiyan
d1ff893b32 fix: disable update_to_buf_dir when netrw is not disabled
fixes #718
2022-02-07 09:19:44 +01:00
kiyan
e1c3744631 refacto: rewrite reloader
next step needs to merge the reloader and the explorer, the ancient code
was super complicated and long and the new one is very similar to the explorer.
2022-02-06 23:18:12 +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
9215533382 fix: defer to 100ms empty buffer removal 2022-02-06 21:29:24 +01:00
kiyan
f173d28003 fix: remove schedule for on_enter 2022-02-06 20:09:59 +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
0573c68fd7 fix: check tree exists before hijacking buffer dir
fixes #934
2022-02-06 18:54:57 +01:00
kiyan
b76602182f refacto: simplify explorer and make it a bit faster
Also fixes #933
2022-02-06 18:51:17 +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
Munif Tanjim
7b64075bdf fix: close_node (#931) 2022-02-05 23:09:50 +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
756b7acc52 chore: cleanup dir and file creation in explorer 2022-02-05 18:18:52 +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
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
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
067525a1fa chore(doc): remove old unused hl groups
fixes #804
2022-02-05 16:51:50 +01:00
kiyan
4af3104d78 fix(git): properly assign git status to directories
fixes #869
fixes #854
2022-02-05 14:42:11 +01:00
kiyan
5697dc4fcf fix: typo in view for focused file
fixes #782
2022-02-05 14:04:58 +01:00
kiyan
52dd0402de chore: extract functions initialization in create-file 2022-02-05 13:57:13 +01:00
kiyan
c74c44d80b fix: remove unused config from doc
closes #820
2022-02-05 13:15:22 +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