Cover image for Making Powerline Work In Visual Studio Code Terminal

Making Powerline Work In Visual Studio Code Terminal

mattstratton profile image Matt Stratton ・1 min read

As I mentioned in a previous post, I'm totally digging on the embedded terminal in Visual Studio Code. However, as I also mentioned, it wasn't properly representing my powerline prompt.

zsh prompt in VS Code

zsh prompt in iTerm

I solved the problem today - in case you are having a similar issue, it's a pretty easy fix. Granted, I've only proven this out on OS X, but I believe a similar solution would apply on Windows or Linux.

  1. Download proper patched font - https://github.com/abertsch/Menlo-for-Powerline
  2. In your User Settings (Code | Preferences | Settings) add this:
"terminal.integrated.fontFamily": "Menlo for Powerline",

Tadah! My prompt in Code now looks right!

(Yes, the colors look different than the previous screenshot; since taking those screenshots I changed from using the powerlevel9k oh-my-zsh theme to instead use powerline-go.)


Editor guide
webdevfarhan profile image
Farhan Madani

In my case, i was struggling for proper step by step solution for ubuntu 18, so i am writing what worked for me:

  1. Download this font github.com/ryanoasis/nerd-fonts/re... . Create a folder named "Meslo" and extract all the fonts inside it.
  2. Move this folder to /usr/share/fonts/truetype/
  3. Run this command sudo fc-cache -vf /usr/share/fonts/
  4. In settings.json of vscode add this line "terminal.integrated.fontFamily": "MesloLGM Nerd Font",
  5. Save and Restart if necessary, it should work. Done.

Type fc-list | grep -i "meslo" to know the names of other fonts so you can use other fonts in the terminal.

emmanuelnk profile image
Emmanuel N Kyeyune

Thank you so much! This was bugging me for hours and you also helped me solve an issue I had with Gogh in the same way.

vdvcoder profile image

This works for Ubuntu 18.04. Thank you!

mapfumo profile image
Antony Mapfumo

Thanks. This works for Manjaro 20.0.1

sanchezpepe profile image
Pepe Sánchez

Thank you! Working in elementary OS 5.1.3 Hera

niksingh710 profile image
Nikhil Singh

I had searched the whole internet but it worked by your tutorial. Thanks a lot.

revoltez profile image

beautiful , thanks that saved me hours !! working in linux mint 19.1

fikimaulana profile image
Fiki Maulana

Thank you. This works on my vscode manjaro 20.2. :)

ilq profile image
Lazarev iLya

When I add "Menlo for Powerline" in settings, VSCode say "The terminal only supports monospace fonts."

icefire1 profile image
Simon Larsen

I had the same problem. What worked for me was setting "terminal.integrated.fontFamily": "Menlo for Powerline" and restarting Visual Studio Code. Making sure not to press the "monospace" dialog that Visual Studio Code presents as this would set "terminal.integrated.fontFamily": "monospace"

puchkii profile image
Kevin Blank

What can i do if i have pressed monospace dialog? ive set the terminal.integrated fontFamily to Menlo for Powerline but it still doesnt work....

Thread Thread
icefire1 profile image
Simon Larsen

It's been a while now. But ensure the settings remains between VScode reboots. Personally I am currently using "MesloLGM Nerd Font" instead

dolemoine profile image

Thx! I was facing the same issue and restarting vscode after setting "terminal.integrated.fontFamilly" to "Menlo for Powerline" solve the problem as the popup dialog wouldn't show anymore!

mattstratton profile image
Matt Stratton Author

Hmm. I just tried this again (on a recently updated VS Code) and it worked for me. This is on OS X; what OS are you on?

ilq profile image
Thread Thread
scaratec profile image
Randy Gupta

I have the very same issue here and I can't get the powerline fonts working on VS code with ubuntu.


Thread Thread
ilq profile image
Lazarev iLya

Try setting: "terminal.integrated.fontFamily": "monospace",

Thread Thread
servatj profile image

still not working...

Edited: My Solution.

instead of moving the font file to hidden folder .fonts in user home do this in ubuntu

sudo mv Menlo\ for\ Powerline.ttf /usr/share/fonts/

then sudo fc-cache -vf /usr/share/fonts/

I'm using ubuntu 18.04 at the moment of writting this, hope it helps.

Thread Thread
dzintars profile image
Dzintars Klavins

Works for Fedora 30 as well!. Tnx.

odedbaruch profile image

awesome !!!

yellowfoxh4xor profile image
Akshat katiyar

I guess we dont have to download new fonts for this purpose.
Just use the exisiting iTerm font

"terminal.integrated.fontFamily": "same font name as iTerm",

example - 'MesloLGS Nerd Font'

p4t0n1x profile image
Salvador Gudino

Excellent helpfully info, thank you very much!

vsfountain profile image
bonstine profile image
Bonnie Simon

I am using JetBrains Mono. But I can't seem to get the powerline fonts working. What can I do?

berkmann18 profile image
Maximilian Berkmann

Straightforward and helpful. Thank you!