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

Deprecate misc instant/*.vim files #243

Open
dbarnett opened this issue May 17, 2021 · 2 comments
Open

Deprecate misc instant/*.vim files #243

dbarnett opened this issue May 17, 2021 · 2 comments

Comments

@dbarnett
Copy link
Contributor

Should we get rid of maktaba's feature to detect and source vimscript files under a plugin's instant/ directory? It's one of the more "magical" features and contributes to slow startup times.

There's one special case of instant/flags.vim tracked separately in #189 that deserves some special attention. For other cases, if "instant" setup really can't be deferred until later in vim's init process, it could just go into an autoload helper function designed to be called explicitly in vimrc.

@dbarnett
Copy link
Contributor Author

Looking around for existing instant/ files, I found a couple interesting cases besides flags.vim:

  • Pre-configuring default settings for vim that can be overridden later in vimrc. May need to go in autoload helpers if they can't use other tricks to avoid stomping on users' explicit config.
  • Registering hooks with other plugins. I suspect these actually don't need to be instant.
  • Attempts at automatic dependency management. These should probably just be dropped to no longer be automatic, but to give clear warnings if they're installed without essential dependencies.

@dbarnett
Copy link
Contributor Author

And since this will require a plugin-by-plugin migration process, I'd want users to be able to easily report issues to plugin maintainers and have an escape hatch to re-enable the legacy behavior. The override could look something like this:

call maktaba#EnableLegacyInstantFilesForPlugins(['someplugin', 'codefmt', 'syncopate'])

taking a list of plugin names that still need legacy behavior and ignoring instant files for everything else. You could opt-in for ALL your plugins like:

call maktaba#EnableLegacyInstantFilesForPlugins([])

and at some point we'd update maktaba to make that the default behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant