getantidote / getantidote.github.io

Get Antidote - The fast, native, Zsh plugin manager
2 stars 0 forks source link

Considering adding notes for lazy-load #1

Open LuckyWindsck opened 1 year ago

LuckyWindsck commented 1 year ago

Hi, I am new to antidote, and I am migrating from antigen. I failed when I followed this documentation to lazy-load antidote, but then I solved this problem by myself. I think that it might be better if you could add some notes to that, or at least this issue can help anyone if they have similar problem.

In the #Ultra high performance install part of the install section, it says that we need to add ${ZDOTDIR:-~}/.antidote into $fpath to lazy-load antidote:

https://github.com/getantidote/getantidote.github.io/blob/597e2cea7ff89168f4588c11a2b35849ad8f609a/_sections/04-install.md?plain=1#L56-L58

However, I am a macOS user, and I use homebrew to install antidote. So the following code is the correct way for me to achieve that:

# Lazy-load antidote.
fpath+=($(brew --prefix)/opt/antidote/share/antidote/functions)
autoload -Uz $fpath[-1]/antidote

As you mentioned in the #.zshrc part of the install section, the path of antidote will be different if we installed it with a package manager:

https://github.com/getantidote/getantidote.github.io/blob/597e2cea7ff89168f4588c11a2b35849ad8f609a/_sections/04-install.md?plain=1#L37-L41

So maybe we can have similar description for the part of lazy-loading.

LuckyWindsck commented 7 months ago

@mattmc3 Hi, just mention you in the case you didn't notice this issue. Would you mind to share your opinion on adding note to the documentation?