When installing the zsh plugin zsh-autosuggestions or zsh-syntax-highlighting, we usually encounter the problem of oh-my-zsh plugin 'xxx' not found. Now, we analyze and solve the problems of oh-my-zsh plugin 'zsh-autosuggestions' not found and plugin 'zsh-syntax-highlighting' not found.
The problem arises because the plugin's repo isn't cloned locally, so the plugin you want isn't actually installed.
Solving the problem is very simple, just simply enter the following command:
% git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions % git clone https://github.com/zsh-users/zsh -syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting % source ~/.zshrc
You can then reopen the shell and find that the problem is resolved. You can also use this method to solve such problems with other plugins.