Reputation: 2051
I'm trying to integrate zsh on my VSC setup but apparently arrows are not recognized by it.
My zsh theme is agnoster and I've already tried adding "terminal.integrated.fontFamily": "Meslo LG M DZ for Powerline"
with no success. Anyone experienced something like this and can give me a hand? Thanks.
Upvotes: 46
Views: 55673
Reputation: 5298
In my case, using zsh and the agnoster theme I had to move the font files to the fonts folder because installing them was not simply enough.
$ sudo mv Menlo*.ttf /usr/share/fonts
I found inspiration here, but I used the Meslo fonts, not the Menlo ones. So in my VSCode settings are:
{
...,
"terminal.integrated.fontFamily": "MesloLGS NF"
}
My case is a bit special but just in case it helps anybody.
Cheers!
Upvotes: 0
Reputation: 1
In Sonoma, install MesloLGS Nerd Font fonts and change the setting to "terminal.integrated.fontFamily": "MesloLGS Nerd Font" in settings.json
Upvotes: 0
Reputation: 2051
Most modern shell prompts use particular fonts (e.g. Powerline, NerdFonts, etc.) which are designed to enhance the visual appearance of terminal applications by providing additional symbols, icons, and glyphs. If you don't have this type of font installed in your system you won't be able to see those special symbols.
The fix is pretty straightforward. You will find yourself in one of the following two cases.
This is the easy one. Most probably you just have to tell VSCode to use your terminal font.
Find out and copy your everyday terminal font
iTerm2 › Preferences › Profiles › Text
and copy the Font Name
(e.g. MesloLGS NF
)Set the terminal font on VSCode
terminal.integrated.fontFamily
in the search box at the top of Settings tabTerminal › Integrated: Font Family
field[Alternatively] Modify the VSCode settings.json
file and add
{
...,
"terminal.integrated.fontFamily": "MesloLGS NF"
}
Done! 🎉 Now you should see every symbol correctly
If this is the case you'll probably need to install a compatible font. I like and recommend Nerd Fonts but also Powerline Fonts or Fontawesome Fonts work totally fine.
Download and install a compatible font
MesloLGS NF
font available to all
applications on your system.Set the terminal font on VSCode
terminal.integrated.fontFamily
in the search box at the top of Settings tabMesloLGS NF
as value into the Terminal › Integrated: Font Family
field[Alternatively] Modify the VSCode settings.json
file and add
{
...,
"terminal.integrated.fontFamily": "MesloLGS NF"
}
Done! 🎉 Now you should see every symbol correctly
You can find many different compatible fonts, for instance here https://www.nerdfonts.com/font-downloads. Install them by downloading the tff files as explained and simply change the terminal font setting in VSCode to use them.
I recommend this site https://www.programmingfonts.org/#meslo which gives you a test drive of all the most used programming fonts!
Upvotes: 78
Reputation: 21
Ubuntu 22.04 Solution:
Download and extract fonts:
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.0.0/Meslo.zip
sudo unzip Meslo.zip -d /usr/share/fonts/truetype/Meslo
Go to vscode settings: File > Preference > Settings
Search : terminal integrated font
Insert font name : MesloLGM Nerd Font
Restart VS Code.
Done !
Upvotes: 2
Reputation: 21
In manjaro, install MesloLGS fonts and change the setting to"terminal.integrated.fontFamily": "MesloLGS NF"
in settings.json
while the font path is ~/.fonts
Upvotes: 1
Reputation: 681
I had the same exact issue on my Macbook. The problem was that the font I was using in Iterm was not added in the Terminal of VSCode.
fix was simple, you have to go to open Iterm -> Preferences -> Profiles -> Text and copy the Font Name
now head over to VS Code:
Terminal Font
Terminal > Integrated: Font Family
and that will fix the issue for you!
Upvotes: 42
Reputation: 51
Most of the other answers didn't solve the issue for me in Manjaro Linux (KDE).
I eventually found a solution that made the Powerline glyphs visible in my VS Code zsh terminal:
https://forum.manjaro.org/t/kde-powerline-glyphs-missing-in-vscode-integrated-terminal-only/63742/3
Just set the font to NotoSansMono Nerd Font
. This font was already installed on my system. I did not need to download any additional fonts.
There are two ways to change the font in VS Code:
Change the following line in settings.json
:
"terminal.integrated.fontFamily": "NotoSansMono Nerd Font"
Alternatively, go to Settings -> Features -> Terminal and set Terminal > Integrated: Font Family to:
NotoSansMono Nerd Font
You may need to restart VS Code.
Upvotes: 4
Reputation: 3774
If you already have a font installed which is looking fine in your terminal app (for example in iTerm2) and the font is just messed up inside VSCode, you don't have to install any additional fonts. Just add:
{
...,
"terminal.integrated.fontFamily": "YourFontName"
}
to your settings.json
where YourFontName
is the name of the font you would like to use. On macOS you can see what fonts you have installed in your font book (search for font book
in the spotlight Command + Space) which looks like this:
In my case my settings.json
has the following entry:
{
...,
"terminal.integrated.fontFamily": "MesloLGS NF"
}
Upvotes: 10
Reputation: 286
For me it worked for linux and as well as manjaro (i don't know why others solution weren't working for me).
Download this font download font from here , Then create a folder named "Meslo" and extract all the fonts inside it.
Move this folder to /usr/share/fonts/truetype/
Run this command:
sudo fc-cache -vf /usr/share/fonts/
In settings.json of vscode add this line:
"terminal.integrated.fontFamily": "MesloLGM Nerd Font"
Save and Restart if necessary, it should work. Done.
Upvotes: 27
Reputation: 57
I had the same problem with my VS Code, WSL terminal (PowerLevel10K) on Windows 10. It looked exactly like yours. I found that my Terminal>Integrated:Font Family was named incorrectly. I use "DroidSansMono Nerd Font". I had entered it as "Droid Sans Mono Nerd Font".
That is not the way the font name shows up in programs like Word, Notepad or Photoshop. When I entered as it was shown in notepad,
I closed and reopened my VS Code terminal and everything rendered as expected.
So check your installed font name in your operating system's word processing software and see how it is listed. Enter it likewise into Terminal>Integrated:Font Family and your VS Code terminal should render correctly also.
Upvotes: 0
Reputation: 651
Finally made it work after going through many blogs and GitHub comments. The below steps works for macOS.
git clone https://github.com/abertsch/Menlo-for-Powerline.git
Open this folder in finder. Double click on Menlo for Powerline.ttf
file.
Click on Install Font
Open the settings.json
file in VSCode and add the below line.
"terminal.integrated.fontFamily": "Menlo for Powerline"
If you still can't see the fonts in the terminal try restarting VSCode.
You can use the above steps to use any font you want.
Upvotes: 17