Skip to content

Considering adding notes for lazy-load #1

Description

@LuckyWindsck

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions