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

Migrate from antigen to antidote #1

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

Migrate from antigen to antidote #1

LuckyWindsck opened this issue Aug 19, 2023 · 1 comment

Comments

@LuckyWindsck
Copy link
Owner

LuckyWindsck commented Aug 19, 2023

Summary

I am going to migrate the zsh plugin manager I used from antigen to antidote.

Reasons for migration

antigen is in maintenance mode, no new features.

Why antidote?

antidote satisfied all following requirements I need.

  1. antidote has NO dependency other than zsh.
  2. antidote satisfies basic CRUD features for plugin management.
  3. antidote partially supports XDG Base Directory Specification.
    • It provide an environment variable, ANTIDOTE_HOME, to set home folder.
  4. antidote supports pre / post hook.
    • pre hook allows me to set environment variables for some plugins before I use them.
      • I need it to fix this bug of zsh-highlighting.
    • post hook allows me to run a patch script to fix or enhance some plugins.
      • I need it to fix this bug of zsh-autosuggestions.
    • Of course I can write plugins to do what I want, but if I use hooks, I don't need to worry about the plugin order.
  5. antidote supports async load (defer).
  6. antidote supports specifying branch.
  7. antidote supports using local plugin natively.

Also, antidote has an official repo for example zsh config that uses antidote.

Why not other plugin manager?

I've compared all zsh plugin managers listed in zsh_unplugged that are acitve and fast.

  1. Most of them didn't satisfy my requirements listed above.
  2. The rest of them do too many things, while antidote is simple enough and it only focuses on plugin management.
    • antigen will run compint automatically.
    • zinit does too many other things, and it has a steep learning curve for me.
@LuckyWindsck
Copy link
Owner Author

antigen does support hook with the antigen-add-hook function, and I did implement hooks with that function.

However, it seems like that the antigen-add-hook function will only be load once due to the cache feature of antigen. When I open a new interactive shell, zsh will warn that "command not found: antigen-add-hook". So I've tried to disable the cache feature, but then other issue occurs. (See: Disabling cache causes issue with git plugin) Although there is workaround to fix it, it's not recommended by official guide due to performance issue.

Anyway, antigen is slow and it is not active now, so I decided to migrate to antidote.

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