antidote: Can't seem to make completion work (taking oh-my-zsh docker plugins for example)
Hi, I’m not sure what I’m missing, but auto completion doesn’t seem to work for me.
This is my config:
https://github.com/zsh-users/zsh-completions
https://github.com/belak/zsh-utils path:completion
https://github.com/ohmyzsh/ohmyzsh path:lib
https://github.com/ohmyzsh/ohmyzsh path:plugins/docker kind:defer
https://github.com/ohmyzsh/ohmyzsh path:plugins/docker kind:fpath
https://github.com/ohmyzsh/ohmyzsh path:plugins/terraform kind:defer
https://github.com/ohmyzsh/ohmyzsh path:plugins/terraform kind:fpath
https://github.com/jeffreytse/zsh-vi-mode
And I’m trying to make docker and terraform completions work.
If I run compinit manually in a shell, they work in that shell. From the docs, it seems that adding those completion plugins at the top should work, but I don’t know what I’m missing.
I tried having them as kind:defer only (only 1 line instead of the 2 lines I have), but that doesn’t work either
It might have something to do with zsh-vi-mode’s “after init” commands, and I am using a zvm_after_init() function to run “extra commands”, so I might need to do something similar for those plugins as well (however, I tried disabling zsh-vi-mode, but I still don’t have the completion)
Can you please let me know if this issue can be solved? I really want to switch to antidote, but these are preventing me from doing that 🙁
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 17 (7 by maintainers)
As of June 2024, the recommended way of handling OMZ is now to include the new getantidote/use-omz plugin at the TOP of your
.zsh_plugins.txtfile. It handles all OMZ dependency resolution, setting OMZ variables, and deferred completion initialization for OMZ users. No morecompdeferrors, and no more need to use a separate completion plugin!Hi Team, I am also unable to get auto complete to work with ohmyzsh plugins like asdf, docker etc. Kindly suggest.
No. The recommended way to load antidote is absolutely to use
antidote load, however there is a different way to load it if you really want to avoid any calls to antidote whatsoever unless absolutely necessary. Depending on which way you choose, you’ll see different output inzprof. My call out was merely that somethings you see inzprofare rollups of the underlying work, so antidote-load will look like it takes the longest, but really it’s the summation of all your plugin timings, and if you load it a different way your config will still take just as long, you just won’t see all that grouped together under one heading.You are only using instant prompt if .zsh_plugins.txt contains
romkatv/powelevel10kand the first few lines in your .zshrc is this:Based on the behavior you describe, I don’t think you are. I suspect you have
$ZSH_THEMEset to an Oh-My-Zsh theme. Switching to powerlevel10k might be the quickest possible way for you to see a big speed improvement without a lot of additional detective work. Its claim to fame is its the fastest Zsh prompt available.Feel free to post your
zprofresults here though, and I can try to help more. Without seeing what you’re seeing though, this is the best I can offer.See:
@farzadmf in the OMZ Docker readme, they include this snippet that allows for
-itrather than-i -tBut this doesn’t give you the completion for the flags, it just lets you still have completion for container names after passing
-itStill not working 🙁
Totally agree. TBH, I don’t care about OMZ (or any other framework for that matter 😛); I just want my completion to be there 😆
It has some nice aliases for path navigation that I use regularly, but even if I disable it (comment it out), nothing changes, and I don’t have auto complete
A couple of questions for you:
antidotemanual, I see two plugins are mentioned for completion:Is only one of these enough? Or should I have both?
antidoteto pick up my changes to the plugin file? Or is it automatic and a new shell is enough to test the changes? This is what I’m doing in my~/.zshrc: