nordtheme / vim

An arctic, north-bluish clean and elegant Vim theme.
https://www.nordtheme.com/ports/vim
MIT License
2.52k stars 274 forks source link

Revert conditional plugin loading #307

Closed svengreb closed 2 years ago

svengreb commented 2 years ago

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