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

Possible workaround for compatibility hacks depending on plugin load order #86

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

mmrwoods
Copy link
Contributor

@mmrwoods mmrwoods commented Mar 7, 2024

Load plugin compatibility hacks on VimEnter

This is just a suggestion I've quickly put together and seems to work fine.

To avoid issues with plugin load order affecting compatibility hacks (e.g. where the hack checks for a variable or function only defined after the other plugin has been loaded), move compatibility hacks to autoload and call after other plugins have loaded via VimEnter autocmd.

To avoid issues with plugin load order affecting compatibility hacks
(e.g. where the hack checks for a variable or function only defined
after the other plugin has been loaded), move compatibility hacks to
autoload and call after other plugins have loaded via VimEnter autocmd.
@LunarWatcher
Copy link
Owner

I suspect this isn't going to work reliably with all plugins (because load order also includes load order of autoload files that run functions that immediately makes certain variables useless afterwards; see for example #84, which is just auto-pairs causing problems with itself), but that does not really matter. It seems to work here, and that's what hacks are for :p

Thanks!

@LunarWatcher LunarWatcher merged commit cd97efb into LunarWatcher:master Mar 7, 2024
4 checks passed
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.

2 participants