fix(setup): defer merging config until needed #1658
+75
−41
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
neo-tree has a ton of configuration, so sometimes merging the config table takes a significant portion of startup time. This leads to people lazy-loading neo-tree which sometimes causes issues to be filed, mostly with netrw hijacking. This PR defers the merging until:
:Neotree
command parsing/executionOn my machine, this reduces startuptime to ~2-3ms when it was previously ~30ms.
Some precautions are taken to prevent breaking people's setups who already lazy-load neo-tree.
Also turned the plugin file to lua because it's easier for me to work with.
Edit: fixed a bug where
source=
cmdline completion wouldn't work.