ohmyzsh: Warning: plugin zsh-syntax-highlighting not found
mac 10.14.3
Just updated to the latest oh-my-zsh by pulling master and am getting the following warning now when starting a new shell.
Warning: plugin zsh-syntax-highlighting not found
Warning: plugin zsh-autosuggestions not found
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 97
- Comments: 21 (4 by maintainers)
I solve it by the 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 ‘’’
on-my-zsh check if the plugin is exit at ‘$base_dir/plugins/$name/$name.plugin.zsh’ or ‘$base_dir/plugins/$name/_$name’ , so the plugin should be at this path .
As described in #7690 users may have ZSH plugins installed by other tools (e.g. Homebrew) and are not sourced in $ZSH/plugins. These should not be referenced inside plugins=(…) within the .zshrc
To be fair zsh-users has proper installation instructions depending on OS for each of those plugins…
You need to follow your preferred options for your OS / package manager etc.
For me,
Reason:
zsh-syntax-highlightingwas installed by other tools (for me, homebrew), so there is not ‘zsh-syntax-highlighting’ folder in path ‘~/.oh-my-zsh/custom/plugins/’ or other path like that.There is a line
plugins=(git zsh-syntax-highlighting)in ~/.zshrc, so when terminal starts, it searches for ‘zsh-syntax-highlighting’ in path as described above.Solution:
As I have tested, both are OK, and you can choose one of them
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlightingRemove the line
plugins=(git zsh-syntax-highlighting)in ~/.zshrcNotes:
Solution 2 is elegant and recommended, because solution 1 means that you install the plugin twice, one by homebrew, and one by manually
我在插件列表中 去掉 autosuggestions和zsh-syntax-highlighting,但是结果也是可以使用的.不解~~~
I think as long as you add
somewhere in your zshrc file you’ll be good to go. The INSTALL doc should cover that. Better ask over there next time though.
Thanks! It’s working.
I use the second method mentioned above, and it solve my issue. Remove the line plugins=(git zsh-syntax-highlighting) in ~/.zshrc The only difference is that there are several plugins inside the (), I only remove zsh-syntax-highlighting, but keep the other plugins. Here is the detailed step in the terminal in case anyone want to know how to do:
If you used
brewto installzsh-syntax-highlighting, you need to open the$HOME/.zshenvfile, remove the lines related tozsh-syntax-highlighting, and then restart your terminal, which can be configured in$HOME/.zshrcfile 😭There’s a separate section for including it with OMZ without having to install it with
apt.Thanks & yes, this works. But being able to just include this with the other plugins and thus using the normal syntax would be nice. 🤷♂️
Having the same problem here on my Raspberry Pi 4. After
sudo apt-get install zsh-syntax-highlightingI found that the package was not installed in my.oh-my-zsh/custom/pluginsfolder but instead here:Now, should I manually move/copy that over to the correct location in my
~/.oh-my-zshfolder or is there a correct way to install such a plugin?Later, I guess I’ll come back and watch this post.
You can remove the plugin from the
oh-my-zshplugin.In case of me, I installed the plugins using
zplug, but inoh-my-zsh, I could not find the plugins installed withzplugand I got an error.So I removed the
oh-my-zshplugin entry from.zsh.https://github.com/ujuc/dotrc/commit/e2537072f7ee3fec4cd3c49afc3a06f0c60a3be1