VS Code Integrated Terminal Not Displaying Special Characters
Asked Answered
C

1

6

My VS Code integrated terminal doesn't recognize the git branch symbols, or the forward arrow character, shown in the first screenshot, which displays correctly in iTerm windows and IntelliJ's integrated terminal.

These characters are coming from iTerm, using the terminal setup steps I went through here: https://medium.com/@Clovis_app/configuration-of-a-beautiful-efficient-terminal-and-prompt-on-osx-in-7-minutes-827c29391961

What I want to see in VS Code integrated terminal: enter image description here What I currently see in VS Code integrated terminal: enter image description here

I did come across a solution to add this to my VS Code settings.json, but this setting has since been deprecated as it has been integrated as the default setting in newer vs updates.

"terminal.integrated.experimentalTextureCachingStrategy": "dynamic"

It's not a pressing issue, but personalizing the VS Code terminal with more git info and aesthetics would be really nice using special characters.

Chophouse answered 12/1, 2022 at 17:15 Comment(2)
That's very likely a font issue. I'd be interested in a solution as well.Byng
Loosely related: Font issues while integrating ZSH on Visual Studio CodeProlegomenon
P
1

Install a powerline/nerdfont font to your system if you haven't already, and then specify that font in the terminal.integrated.fontFamily setting in your settings.json file.

Quoting from the VS Code docs:

Powerline fonts are special patched fonts that contain additional characters that can be used in the terminal. VS Code's terminal renders some of the Powerline symbols without needing to configure a font, but if more glyphs are desired, configure a Powerline font with the font family setting. Powerline fonts typically end in " for Powerline", the following setting is an example of how to configure a DejaVu Sans Mono that has been patched:

"editor.fontFamily": "'DejaVu Sans Mono for Powerline'"

Nerd Fonts work the same and typically have a " NF" suffix, the following is an example of how to configure Hack's nerd fonts variant:

"terminal.integrated.fontFamily": "'Hack NF'"
Prolegomenon answered 17/2, 2023 at 20:52 Comment(3)
Should be "terminal.integrated.fontFamily": "Hack Nerd Font Mono"Indigotin
@Indigotin "should be" ... it will be the name of whatever nerdfont you have installed and want to use on your system. I'm just quoting from documentation, which is just giving one example of one such name of a font installed on one system.Prolegomenon
user, I meant that for Hack NF is actually Hack Nerd Font. And in the terminal, you must use the monospace version that is Hack Nerd Font Mono. The NF suffix thing you mentioned is not true.Indigotin

© 2022 - 2024 — McMap. All rights reserved.