how to remove the color on my console VS code? - visual-studio-code

I have a problem with my vs code (console) when I type a command on the console it colors me the text, here are the details.
Thanks for your help.
my console
my settings.json

This is one of the many issues caused by winpty.
That "Powershell" in the upper right of your screenshot means that you're using the the regular powershell terminal in VSCode and probably you have those colors set in your powershell.exe (the one that VSCode is using).
So, until this problem is fixed on the "VSCode side", you could try a few things:
reset any color theme/scheme that you may have applied to your powershell.exe
since many issues are related with PSReadLine you can configure his colors like in here
you can try using the Powershell Preview extension which acording to this issue enables PSReadLine support and solves your problem.
I would give this extension a try, with due warning that the intended functionality is only in Preview mode.
Tell me if I can help any more.

Related

VS Code terminal showing ERROR on every line with oh-my-posh

My terminal in VS Code has since the previous update shown the word ERROR on every single line. I have installed oh-my-posh a little while back to make the terminal more pleasant to look at and give me some basic information.
Does anyone know where to look, to find the source of the error message? Tyvm :)
Update
Noticed something different when running echo $ as suggested by #kamen-minkov
When I booted Ubuntu up again and my VS Code opened from the previous state it was in the ERROR label was gone:
However. When I opened up a new tab it returned:
The only difference I can notice between the two is that there is a little, unfilled, circle/dot on the left side of the newly opened tab and not the one that opened up with VS Code. Is it some sort of debugger marking or something else? Could it be the source of the problem?
Apparently it's the Shell Integration decorations that's causing the hazards..
// settings.json
"terminal.integrated.shellIntegration.enabled": false,
"terminal.integrated.shellIntegration.decorationsEnabled": "never",
disable these settings and oh-my-posh error label will be gone :)

Problem with ZSH arrows' colors in Visual Studio Code

I've tried installing oh-my-zsh on my Windows 10 machine recently and everything is looking alright inside Windows Terminal,
ut when I try using it inside VSCode's integrated terminal, the colors are way off and the arrows' colors are different from the rest.
Imgur link to what my terminal looks like since Stack Overflow won't let me post any photo: https://imgur.com/a/3myV6wf
I've tried multiple Powerline fonts, modifying VSCode color theme and changing the terminal foreground color, but the result is always the same.
Thanks in advance for your help
I was perplexed by this as well, turns out it's something that recently broke in VS Code as a result of a new accessibility feature introduced in version 1.66. The solution is to add the following to your VS Code settings.json file:
"terminal.integrated.minimumContrastRatio": 1,
Enforcing a minimum contrast ratio for terminal colors is a great idea that will help users with impaired vision, but an unintended consequence was that it would interfere with the way powerline-style tools render separator characters. Thankfully Microsoft offered us a way to disable it.

Not getting Cascadia Code PL in Powershell

I wanted to get started with posh and oh-my-posh so I installed them according to this article. Microsoft docs. I got the theme but the edges didn't had that arrow(that coolness).
I then downloaded the windows terminal and edited the setting.json there with
"fontFace": "Cascadia Code PL"
So it got the desired result of posh in there.
Now the only problem currently is how to change this in windows powershell. I integrated the powershell in my vs code so there also I was not able to find this theme(or desired result). All I could find is the color but not the arrow and that fancy icons or what the jargon is.
Please help. I want my powershell to have posh.
If I understand correctly, there are two parts to the question.
Changing the PowerShell Window Font
To do this, right-click your PowerShell window and head to "Properties"
There, you can choose the header "Font" and change your font to Cascadia Code PL".
This should fix the problem. If you still experience some weird characters, you might need to install a Nerd Font instead.
Changing the VS Code Terminal Font
To use the font in the VS Code Terminal, head to Settings.
Searching for "integrated terminal font family" should bring up the setting you need to edit. Here, add your font 'Cascadia Code PL' on the very front of the setting and save.
You should now be able to open a terminal and use the PL prompt.

vscode on mac is incorrectly highlighting text around text blocks

It is very annoying to see that background around code is lighter then the rest of the program. When the cursor moves the highlighting moves up and down to full window width. Can you please propose solution how to turn this highlighting off. Same problem is in output of task log, and in file explorer.
I have deleted all the settings and Application data and I have same problem. I have installed vscode on windows and I do not have this problem with same settings.
Unfortunately this is an issue in Chromium. You can work around this by starting VS Code with --disable-gpu from the command line.
Sean
It appears this can be fixed for some users by selecting a different color profile in macOS display settings. Note that you have to change this separately for all monitors that you use.
For me, "Apple RGB" will show these blocks, and switching to "LED Cinema Display" or "iMac" solves the issue.
See also: https://github.com/Microsoft/vscode/issues/12473#issuecomment-269024219

Can't change PowerShell font and window size on Windows 8.1

My PowerShell window opens with a very small font (and window size). This is a common problem, and I found a bunch of suggestions for how to deal with it, but none of the suggestions seem to work. Specifically, the common suggestion that one should open PowerShell with admin privileges, change the properties, and then close the window, doesn't work. It's still small the next time I open it. The only way I managed to get it to open with the right font and window size, was by opening the application directly. Any invocation via a shortcut doesn't give the right properties.
I'm running Windows 8.1, which seems to be the main difference between my situation and that of the other users who had this problem. Any idea how to fix this?
For Windows 8.1, in Start, find PowerShell.
Open file location. Open shortcut Properties (right click menu). Security tab → Edit your permissions to Modify.
Select Font tab (skip errors - nothing is set hence the problem). Select Font (I set Lucida Sans Size 16).
Apply (changes). Security tab Edit permissions remove modify. Apply. All done.
Is it possible that you are adjusting the Properties rather than the 'Defaults'? Also, I am with Keith; the Consolas fonts give you much large sizes than the Raster, and the Lucida Console give people problems.
I'm on Windows 8.1 and the only thing I ever do is start PowerShell via its shortcut then edit the console properties to my liking. I then launch PowerShell elevated and set the same settings. Usually that has me pretty well covered on Windows 8.1. Of course, if you then launch the x86 console for PowerShell you may need to configure it as well.
I had the same problem. As stated here I select a non-12pt font, and it works. So I choose 14 pt Consolas. And it works. I'm using Windows 7 and Windows Server 2012. Both acts like the same.
Run PowerShell as Administrator, set the default font properties, and close the PowerShell window.
Then run PowerShell as the normal user, and you should see the same font as you did before.