mattmc3 / antidote

https://getantidote.github.io - the cure to slow zsh plugin management
MIT License
836 stars 21 forks source link

Can't get command suggestions in Antidote with Zdotdir #131

Closed Anifyuli closed 1 year ago

Anifyuli commented 1 year ago

Hello, Mister. I want to my problem using Antidote with zdotdir for better managements. But, I get some troubles with get command suggestions on below of prompt. My friend use antidote without zdotdir can get command suggestions in him terminal. I mean like this pict WhatsApp Image 2023-06-06 at 22 46 48

In my terminal, I can't get it. Prevously I use OhMyZsh and that features can work clearly using this suggestions. I write my plugins in $ZDOTDIR/.zsh_plugins.txt like this :

# .zsh_plugins.txt

belak/zsh-utils path:editor
belak/zsh-utils path:history
belak/zsh-utils path:utility
belak/zsh-utils path:completion

rupa/z
win0err/aphrodite-terminal-theme path:aphrodite.zsh-theme

zsh-users/zsh-completions
zsh-users/zsh-autosuggestions
zsh-users/zsh-syntax-highlighting

sorin-ionescu/prezto path:modules/completion

ohmyzsh/ohmyzsh path:plugins/command-not-found
ohmyzsh/ohmyzsh path:plugins/sudo
ohmyzsh/ohmyzsh path:plugins/git

My question is how must I do to get my command suggestions like I use OhMyZsh only? Before use Antidote, I use OhMyZsh to costumize my Zsh. Thanks for you solutions.

Brief info : My friend using Arch Linux and he install antidote from AUR I use Pop OS 22.04 and I install using regular method + setup zdotdir

mattmc3 commented 1 year ago

Completions can get complicated due to the way OMZ handles them differently than Prezto or others, but essentially you have the plugin order incorrect and you are using multiple completion plugins when you should just choose one:

If you use one of these completion plugins, you want them just before the end. Also, zsh-syntax-highlighting needs to be sourced at the end. See if something like this helps:

# .zsh_plugins.txt

belak/zsh-utils path:editor
belak/zsh-utils path:history
belak/zsh-utils path:utility

rupa/z
win0err/aphrodite-terminal-theme path:aphrodite.zsh-theme

zsh-users/zsh-autosuggestions

ohmyzsh/ohmyzsh path:plugins/command-not-found
ohmyzsh/ohmyzsh path:plugins/sudo
ohmyzsh/ohmyzsh path:plugins/git

# even though this is called completions, it relies on you to run compinit later
zsh-users/zsh-completions

# this is a plugin that runs compint, and should be close to the end of your plugins file
belak/zsh-utils path:completion

# per its docs, do this plugin last
zsh-users/zsh-syntax-highlighting