-
Notifications
You must be signed in to change notification settings - Fork 10
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
How to properly init completions? #16
Comments
Hi @mike-code! Thank you for the kind words and for using antidote. Happy to answer your questions.
Not be default, no. This plugins calls zstyle ':zephyr:plugin:completion' manual 'yes' Then, you can call the
Zephyr provides one such plugin. You could also use
Actually, you should. Assuming there are completions defined there that you want/need. When it comes to Zsh completions, there are 3 things being handled:
That's usually due to your completions being cached, and TLDR; the recommendation for your .zsh_plugins.txt file for antidote might look like this: # ~/.zsh_plugins.txt
zsh-users/zsh-completions kind:fpath path:src
mattmc3/zephyr path:plugins/completion |
Thanks for the detailed explanation!
alright, so for some reason it doesn't work for me unless I run it myself. I've stripped out all the noise in case sth was conflicting with the plugin and what I'm left with now is: .zshrc #!/usr/bin/env zsh
source ${ZDOTDIR:-~}/.antidote/antidote.zsh
antidote load
# autoload -Uz compinit
# compinit .zsh_plugins.txt zsh-users/zsh-completions kind:fpath path:src
mattmc3/zephyr path:plugins/completion _k0s raspi# echo $fpath[1]
/usr/local/share/zsh/site-functions
raspi# ls /usr/local/share/zsh/site-functions
_k0s
raspi# cat /usr/local/share/zsh/site-functions/_k0s | head -n 3
#compdef k0s
compdef _k0s k0s Now if I try
but if I uncomment autoload + compinit lines in the zshrc and restart shell, I'll see (as expected)
|
I have pushed a new set of commits that I think addresses these sorts of completion questions once and for all. I have used hooks to add a new post_zshrc event. If you include Zephyr's completion plugin, it will queue up all calls to |
Hi.
big fan of antidote here so I wanted to give your completions a try too. I have a few questions here
mattmc3/zephyr path:plugins/completion
, do I still need to call, the following?I'm asking this because antidote autocompletion docs suggest: "run autoload+compinit manually or use plugin". I understood it as, if I use plugin, I don't need to run compinit myself anymore. Would that be correct? nb: if I don't run compinit in my zshrc, some autocompletion won't work (like the ones from
/usr/local/share/zsh/site-functions
).mattmc3/zephyr path:plugins/completion
, I don't (shouldn't) have to usezsh-users/zsh-completions
, right?zsh-users/zsh-completions
, I get odd errors like(eval):1: _nano: function definition file not found
(I've deleted~/.zcompdump
just in case) -- do you an idea why could that be?The text was updated successfully, but these errors were encountered: