Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oh-my-zsh theme not rendering properly in IntelliJ

Cobalt2 theme does not render properly in the terminal in IntelliJ but works fine in the Mac terminal. How do I correct this?

like image 642
Madeleine Smith Avatar asked Mar 27 '17 21:03

Madeleine Smith


People also ask

How do I change my zsh-theme to Agnoster?

Configure Agnoster theme For this, you first need to download a font that supports the unique characters and icons used by the theme. After installing the font, you can enable the Agnoster theme by changing the ZSH_THEME variable inside the ~/. zshrc configuration file.

How do I check my current zsh-theme?

All the current themes can be found in the themes/ directory in the Oh My Zsh distribution.


3 Answers

Thought I'd add for anyone Googling this "zsh themes being broken in IntelliJ" ...especially Powerlevel10k ... you can conditionally switch the theme to a compatible one for your IntelliJ console, and keep the nice one for your main terminal. In .zshrc :

if [[ $__INTELLIJ_COMMAND_HISTFILE__ ]]; then
  ZSH_THEME="robbyrussell"
else
  ZSH_THEME="powerlevel10k/powerlevel10k"
fi

Hope that helps someone :-)

like image 76
BaronVonKaneHoffen Avatar answered Sep 28 '22 00:09

BaronVonKaneHoffen


Please follow this known bug for updates:

  • IDEA-165506 Incorrect style for zsh theme
like image 32
CrazyCoder Avatar answered Sep 28 '22 02:09

CrazyCoder


Changing the color scheme in IntelliJ to the same color scheme you're using in your OS terminal should solve this.

I'm using the Dracula Theme in iTerm2, and I installed the IDE color scheme from here Jetbrains Dracula Theme and it's all displaying as expected.

Here's what my PHPStorm terminal looks like now.

IntelliJ(PHPStorm) Terminal with Dracula Theme

like image 36
Kyle Pillay Avatar answered Sep 28 '22 01:09

Kyle Pillay