Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Considering adding notes for lazy-load #1

Open
LuckyWindsck opened this issue Aug 20, 2023 · 1 comment
Open

Considering adding notes for lazy-load #1

LuckyWindsck opened this issue Aug 20, 2023 · 1 comment

Comments

@LuckyWindsck
Copy link

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:

# Lazy-load antidote.
fpath+=(${ZDOTDIR:-~}/.antidote)
autoload -Uz $fpath[-1]/antidote

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:

**Note:** If you installed antidote with a package manager, the path will be different
than `${ZDOTDIR:-~}/.antidote` so you will need to modify the above script with `source /path/to/antidote.zsh`. For example, if you are using homebrew on macOS, the
command you will need will be:
`source $(brew --prefix)/opt/antidote/share/antidote/antidote.zsh`.
Be sure to follow the instructions provided by your package manager.

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

@LuckyWindsck
Copy link
Author

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant