Example Minimal Setup#
zplugin ice wait"0" blockf
zplugin light zsh-users/zsh-completions
zplugin ice wait"0" atload"_zsh_autosuggest_start"
zplugin light zsh-users/zsh-autosuggestions
zplugin ice wait"0" atinit"zpcompinit; zpcdreplay"
zplugin light zdharma/fast-syntax-highlighting
light– load the plugin inlightmode, in which the tracking of plugin (i.e. activity report gathering, accessible via thezplugin report {plugin-spec}subcommand) is being disabled; note that for TurboMode, the performance gains are actually0, so in this mode you can load all plugins with the tracking, i.e. by usingzplugin ice wait'0'; zplugin load {plugin-spec}commands,wait"0"– load 0 seconds (about 110 ms exactly) after prompt,atinit''– execute code before loading plugin,atload''– execute code after loading plugin,zpcompinit– equals toautoload compinit; compinit,zpcdreplay– executecompdef ...calls that plugins did – they were recorded, so thatcompinitcan be called later (it provides thecompdeffunction, so it must be ran before issuingcompdefs),- syntax-highlighting plugins (like fast-syntax-highlighting or zsh-syntax-highlighting) expect to be loaded last, even after the completion initialization (i.e.
compinitfunction), hence theatinit'', which will loadcompinitright before the plugin, - the
atinitof the plugin runs alsozcdreplay(i.e. "zplugin-compdef-replay"), because aftercompinitis loaded, thecompdeffunction becomes available, and one can re-run the all earlier automatically-caughtcompdefcalls, - add
lucidice-mod to silence the under-prompt messages.
The same setup but without using Turbo-mode (i.e. no wait'' ice):
zplugin ice blockf; zplugin light zsh-users/zsh-completions
zplugin light zsh-users/zsh-autosuggestions
autoload compinit
compinit
zplugin light zdharma/fast-syntax-highlighting
light– as above