Powerlevel9k / powerlevel9k

Powerlevel9k was a tool for building a beautiful and highly functional CLI, customized for you. P9k had a substantial impact on CLI UX, and its legacy is now continued by P10k.
https://github.com/romkatv/powerlevel10k
MIT License
13.47k stars 947 forks source link

Icons cut off in VSCode terminal #1186

Open SylEleuth opened 5 years ago

SylEleuth commented 5 years ago

Everything is working fine in normal terminal (Termite) but not in VSCode (1.32.1).

Termite: 2019-03-10-185251_298x68_scrot VSCode: 2019-03-10-185005_299x70_scrot

I tried different (Nerd) fonts, used different configs, like the one with adding space after icons. It works in Termite, it moves everything like it should: 2019-03-10-185306_297x66_scrot but in VSCode everything stays the same:

ZSH 5.7.1 Oh-My-ZSH Sudo font, but it's the same behaviour with any other echo $POWERLEVEL9K_MODE - awesome-fontconfig

VladimirMikulic commented 5 years ago

The same thing happened to me. Make sure that you copy the font that you want to use in ~/.local/share/fonts and then you specify that font in VS Code settings. For example: "terminal.integrated.fontFamily": "Hack Nerd Font"

marcuskwan commented 5 years ago

"Hack Nerd Font" @VladimirMikulic Thank you, I was having this issue and people recommend a powerline monospaced font, but this worked!

HymanZHAN commented 5 years ago

I encountered a similar issue with oh-my-zsh, spaceship theme and nerdfont.

vscode_internal_terminal

Upper left: Tilix; Upper right: Gnome Terminal; Bottom: VS Code All use MesloLGM Nerd Font Regular

First of all the rendered icons' styles are clearly different. What's more annoying is that the 🐳 icon, which should actually occupy the space of two letters, occupies the space of only one letter and masks the second space. As shown in Tilix and Gnome Terminal, there should be a blank space after the 🐳 icon but there is none in the VS Code integrated terminal, making it look very crowded.

VladimirMikulic commented 5 years ago

@HymanZHAN try this:

Do you use the integrated terminal in VS Code?

Solution 1)

Try to switch to the external one. Since in Tilix, everything works great set VS Code terminal to Tilix, instead of a built-in one.

Solution 2)

VS Code is built with Electron. If you know some HTML, CSS & JS you can easily style it as you want. Install this plugin: [https://marketplace.visualstudio.com/items?itemName=be5invis.vscode-custom-css]

Open DevTools, select inspector, get class of the column that contains :whale: icon and add margin right to it.

iilonmasc commented 5 years ago

This is not an issue with p9k but an issue with either:

Different terminal emulators use various font-settings as defaults for example:

and as @VladimirMikulic already suggested you should be able to style the VSCode internal terminal with css

bahaaador commented 5 years ago

I managed to fixed icon cut off on my instance by changing the vscode integrated render type to canvas:

"terminal.integrated.rendererType": "canvas"

tomwolber commented 5 years ago

@baha2r this worked for me too

skrishnak7 commented 4 years ago

I managed to fixed icon cut off on my instance by changing the vscode integrated render type to canvas:

"terminal.integrated.rendererType": "canvas"

This Worked! Thank You so much

dannyxnda commented 4 years ago

The same thing happened to me. Make sure that you copy the font that you want to use in ~/.local/share/fonts and then you specify that font in VS Code settings. For example: "terminal.integrated.fontFamily": "Hack Nerd Font"

The same thing happened to me. Make sure that you copy the font that you want to use in ~/.local/share/fonts and then you specify that font in VS Code settings. For example: "terminal.integrated.fontFamily": "Hack Nerd Font"

Work immediately, thank you!