zsh-users/zsh-syntax-highlighting should be loaded at the end · Issue #26 · zplug/zplug
b4b4r07 added a commit that referenced this issue
Dec 7, 2015- in order to solve #26 problem - nice tag means loading priority/order - range from -20 (highest) to 19 (lowest)
Hi @leomao
In order to solve this problem, I will suggest you to introduce new tag called nice:.
By using the nice tag, the zplug user can set the priority of the loading order of the plugins.
Priority levels of nice range from -20 (highest) to 19 (lowest) and defaults to 0. In addition, the plugins are loaded after running compinit command when the nice tag is 10 or larger.
# Make sure you use double quotes zplug "zsh-users/zsh-history-substring-search" # zplug ... more plugins # will run compinit -d "${ZPLUG_HOME}/zcompdump" at this line zplug "zsh-users/zsh-syntax-highlighting", nice:19 zplug load # will load plugins in the order of nice tag
Would you let me know what you think about it?
Hi,
I am not sure whether I understood this mechanism correctly or not.
zplug A, nice:-20 zplug B, nice:-10 zplug C
The order will be A -> B -> C ?
It seems that the order is C -> B -> A actually.
I think this is caused by for key in ${${(on)nices}#*:}, since the numeric sort of zsh doesn't recognize minus sign as a part of number.
arr=(1 -1 0 2 -2) echo ${(on)arr} # 0 1 -1 2 -2
Changing it to for key in ${${(OnM)nices:#-*}#*:} ${${(on)nices:#-*}#*:} will work.