-
-
Notifications
You must be signed in to change notification settings - Fork 626
refacto: buffer management, setup fixes, autocmd fixes #967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Buffer management rewritten to be completely wiped out when closing the view. Buffer is properly intanciated when needed. The setup autocmd have been a bit cleaned up, less indirections. Renamed update_to_buf_dir to hijack_directories wich makes more sense. Sessions with a tree buffer will open with the tree (without the state saved). Also added ability to open with a path like `:NvimTreeOpen /some/dir`. Renamed view.win_open to view.is_visible. Started to make a proper api for the view, to avoid mutating the internals from the outside (and thus leaking abstractions to the callers).
fixes lazy loading
Allows not initializing nvim-tree at all during setup which should make startup time better for people not using the open_on_setup or not opening on directory.
also run find_file when preventing buffer override
870ac07
to
48818d5
Compare
Just tested this branch, at least the intro screen (#193) works as expected, thanks for fixing so quickly! |
Can confirm that the error on #965 doesn't happen anymore. Thanks for the hard work! |
merging this then, there might new issues coming up, will see :) The codebase will soon be in a state where testing might become a reality 😄 |
Same here, every time I open a file this error occurs. |
reinstalled plugin, not seeing the errors anymore. |
not sure, but i forgot to guard the diagnostic code against the tree not being initialized (which can happen). I just pushed a fix this morning. |
Buffer management rewritten to be completely wiped out when closing the view.
Buffer is properly intanciated when needed.
Started to make a proper api for the view, to avoid mutating the internals from the outside (and thus leaking abstractions to the callers).
The autocmds have been a bit cleaned up, less indirections.
Renamed
update_to_buf_dir
tohijack_directories
wich makes more sense.Sessions with a tree buffer will open with the tree (without the state saved).
Also added ability to open with a path like
:NvimTreeOpen /some/dir
.Renamed
view.win_open
toview.is_visible
(BREAKING).Doesn't load the directory on setup when not needed, which should improve startuptime.
Fixes #601
Fixes #488
Fixes #965
Fixes #238 (possible to setup
open_on_setup
tofalse
andhijack_directories
with auto open and enable totrue
will do this behavior)Fixes #502
Fixes #193
Fixes #592
And maybe even more issues could be closed.
Please people tagged in these issue, try this PR and confirm it works well.