Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrated Terminal Rendering Issue with Starship Prompt in VSCode #236133

Closed
TheRealSwayamShree opened this issue Dec 14, 2024 · 2 comments
Closed
Assignees
Labels
info-needed Issue requires more information from poster terminal-conpty Integrated terminal issues related to the ConPTY backend upstream Issue identified as 'upstream' component related (exists outside of VS Code) windows VS Code on Windows issues

Comments

@TheRealSwayamShree
Copy link

TheRealSwayamShree commented Dec 14, 2024

Type: Bug

I'm encountering an issue with the integrated terminal in VSCode when using the Starship prompt. The $username and $directory portion of the prompt appears with extra blank spaces, which do not appear in Windows Terminal with the same configuration.

Steps to Reproduce:

  1. Configure Starship with the following settings (see attached configuration file).
  2. Set the terminal font to "CaskaydiaCove Nerd Font" in VSCode.
  3. Open the VSCode terminal.

Expected Behavior:

  • The prompt should render without additional spaces, consistent with its appearance in Windows Terminal.

Actual Behavior:

  • Blank spaces appear around the $user and $directory section of the prompt in the integrated terminal.

Environment:

  • VSCode Version: 1.96
  • OS: Microsoft Windows 11 Home Version: 10.0.22631 Build 22631
  • Font: CaskaydiaCove Nerd Font
  • Terminal: Integrated Terminal using PowerShell

VS Code version: Code 1.96.0 (138f619, 2024-12-11T02:29:09.626Z)
OS version: Windows_NT x64 10.0.22631
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz (8 x 1992)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 15.84GB (7.04GB free)
Process Argv --crash-reporter-id 6e0e71da-9aa2-45b9-8422-e962e7ff6a9d
Screen Reader no
VM 0%

starship config:

"$schema" = 'https://starship.rs/config-schema.json'

format = """

$os
$username
[](bg:yellow fg:red)
$directory
[](fg:yellow bg:green)
$git_branch
$git_status
[](fg:green bg:cyan)
$c
$nodejs
$python
[](fg:cyan bg:bright_black)
$time

$line_break$character"""

palette = 'caramel_light'

[palettes.caramel_light]
black='#3B302C'
red='#C85A54'
green='#7C9A62'
yellow='#D6AA5A'
blue='#89A5C7'
magenta='#B58696'
cyan='#6CA9A6'
white='#F5F0E6'
bright_black='#6D5E55'
bright_red='#D3756D'
bright_green='#98B27D'
bright_yellow='#E2BC76'
bright_blue='#A3BDD3'
bright_magenta='#C79DA6'
bright_cyan='#8ABBB8'
bright_white='#FFFFFF'

[os]
disabled = false
style = "bg:red fg:white"

[os.symbols]
Windows = "󰍲"
Ubuntu = "󰕈"
SUSE = ""
Raspbian = "󰐿"
Mint = "󰣭"
Macos = "󰀵"
Manjaro = ""
Linux = "󰌽"
Gentoo = "󰣨"
Fedora = "󰣛"
Alpine = ""
Amazon = ""
Android = ""
Arch = "󰣇"
Artix = "󰣇"
EndeavourOS = ""
CentOS = ""
Debian = "󰣚"
Redhat = "󱄛"
RedHatEnterprise = "󱄛"

[username]
show_always = true
style_user = "bg:red fg:white"
style_root = "bg:red fg:white"
format = ' $user '

[directory]
style = "fg:black bg:yellow"
format = " $path "
truncation_length = 3
truncation_symbol = "…/"

[directory.substitutions]
"Documents" = "󰈙 "
"Downloads" = " "
"Music" = "󰝚 "
"Pictures" = " "
"project" = "󰲋 "

[git_branch]
symbol = ""
style = "bg:cyan"
format = '[ $symbol $branch ](fg:white bg:green)'

[git_status]
style = "bg:cyan"
format = '[($all_status$ahead_behind )](fg:white bg:green)'

[nodejs]
symbol = ""
style = "bg:red"
format = '[ $symbol( $version) ](fg:red bg:red)'

[c]
symbol = " "
style = "bg:red"
format = '[ $symbol( $version) ](fg:red bg:red)'

[python]
symbol = ""
style = "bg:cyan"
format = '[ $symbol( $version) ](fg:black bg:cyan)'

[time]
disabled = false
time_format = "%I:%M %P|%a %b %d %Y"
style = "bg:bright_black"
format = '[  $time ](fg:white bg:bright_black)'

[line_break]
disabled = false

[character]
disabled = false
success_symbol = '[](bold fg:green)'
error_symbol = '[](bold fg:red)'
vimcmd_symbol = '[](bold fg:green)'
vimcmd_replace_one_symbol = '[](bold fg:blue)'
vimcmd_replace_symbol = '[](bold fg:blue)'
vimcmd_visual_symbol = '[](bold fg:yellow)'

@meganrogge
Copy link
Contributor

does disabling terminal.integrated.shellIntegration.enabled fix it?

@meganrogge meganrogge added the info-needed Issue requires more information from poster label Dec 16, 2024
@meganrogge meganrogge assigned Tyriar and unassigned meganrogge Dec 16, 2024
@Tyriar
Copy link
Member

Tyriar commented Dec 19, 2024

This issue seems to originate from an upstream component and is not something VSCode can fix by making a change to our code. As such, I will go ahead and close it. Please try to reproduce in Windows Terminal and report to microsoft/terminal with repro steps.

If you cannot reproduce in Windows Terminal, chances are it's fixed in a later version of Windows. You can read more about how we consume conpty here. Additionally, soon we plan on shipping conpty v2 with VS Code which should bring our behavior in line with Windows Terminal. Thanks for understanding.

/label upstream terminal-conpty windows

@Tyriar Tyriar closed this as completed Dec 19, 2024
@vs-code-engineering vs-code-engineering bot added terminal-conpty Integrated terminal issues related to the ConPTY backend upstream Issue identified as 'upstream' component related (exists outside of VS Code) windows VS Code on Windows issues labels Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed Issue requires more information from poster terminal-conpty Integrated terminal issues related to the ConPTY backend upstream Issue identified as 'upstream' component related (exists outside of VS Code) windows VS Code on Windows issues
Projects
None yet
Development

No branches or pull requests

3 participants