- Published on
Using Sheldon for zsh Plugin Management
- Authors

- Name
- Daisuke Kobayashi
- https://twitter.com
I used to manage my zsh plugins with zinit, but recently I decided to try sheldon. There are already plenty of articles explaining the general configuration, so here I will focus on the points that took me the most trial and error.
alias, env, opt, style
At first I loaded everything asynchronously, but the result was not what I expected, probably because of configuration order and related timing issues. I switched back to synchronous loading. Since none of these operations are particularly heavy, synchronous loading has not caused any practical problems.
nvm and *env initialization
Initializing tools such as nvm and the various *env managers (nvm, pyenv, rbenv, goenv, and so on) takes time, so I load those asynchronously.
If you use multiple *env tools, splitting each initialization step into a separate file can shorten startup time. To do asynchronous loading with sheldon, you need zsh-defer.
At first I was loading the nvm and *env initialization steps at the same time as the other plugins. Right after opening a terminal, however, I ran into a problem where key input would not be accepted for about five seconds while initialization was still running. After a fair amount of trial and error, I was able to mitigate the issue by loading only nvm and the *env tools through zsh-defer with an explicit delay.