Skip to content
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

fix(setup): defer merging config until needed #1658

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

pynappo
Copy link
Collaborator

@pynappo pynappo commented Jan 16, 2025

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:

  • When netrw may need to be hijacked
  • :Neotree command parsing/execution

On 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.

@pynappo pynappo changed the title feat(setup): defer merging config until needed fix(setup): defer merging config until needed Jan 16, 2025
@pynappo pynappo force-pushed the reduce-startup-time branch from 124ed59 to 5f53146 Compare January 16, 2025 12:44
@pynappo pynappo requested a review from cseickel January 18, 2025 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant