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

Revert conditional plugin loading #307

Merged

Conversation

svengreb
Copy link
Member

@svengreb svengreb commented Apr 23, 2022

The changes introduced in PR #294 did not take into account that the order how plugins are loaded are not always constant and can also change based on how users order plugins in their configurations. When a supported plugin is loaded after Nord the global loaded_* variable might not be available yet, causing the styles to be skipped due to the conditional block guard. Also each plugin manager handles the plugin loading order differently which is also a problem when checking for global variable existence.

The loading time of the Nord plugin is still totally fine so improving the stability for only a minimal performance boost is no negative trade at all (tested via vim --startuptime timing.out):

4.956ms: sourcing ~/.local/share/vim/plugged/nord-vim/colors/nord.vim

Fixes #306

The changes introduced in PR GH-294 [1] did not take into account that
the order how plugins are loaded are not always constant and can also
change based on how users order plugins in their configurations.
When a supported plugin is loaded after Nord the global `loaded_*`
variable might not be available yet, causing the styles to be skipped
due to the conditional block guard. Also each plugin manager handles the
plugin loading order differently which is also a problem when checking
for global variable existence.

[1]: #294
[2]: #306

Fixes GH-306
@svengreb svengreb merged commit 83631df into develop Apr 23, 2022
@svengreb svengreb deleted the fix/gh-307-revert-pr-294-plugin-loading-conditions branch April 23, 2022 20:14
arcticicestudio pushed a commit that referenced this pull request May 14, 2022
The changes introduced in PR GH-294 [1] did not take into account that
the order how plugins are loaded are not always constant and can also
change based on how users order plugins in their configurations.
When a supported plugin is loaded after Nord the global `loaded_*`
variable might not be available yet, causing the styles to be skipped
due to the conditional block guard. Also each plugin manager handles the
plugin loading order differently which is also a problem when checking
for global variable existence.

The loading time of the Nord plugin is still totally fine so improving
the stability for only a minimal performance boost is no negative trade
at all (tested via `vim --startuptime timing.out`):

  4.956ms: sourcing ~/.local/share/vim/plugged/nord-vim/colors/nord.vim

[1]: #294
[2]: #306

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

Successfully merging this pull request may close these issues.

Support for lewis6991/gitsigns.nvim broken
2 participants