Skip to content

Commit

Permalink
Revert conditional plugin loading (#307)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
svengreb committed May 14, 2022
1 parent bf09e50 commit dc6cc32
Showing 1 changed file with 172 additions and 216 deletions.
Loading

0 comments on commit dc6cc32

Please sign in to comment.