How can I change cursor color in VSCode? - visual-studio-code

Is there a way to change the cursor colour in the Visual Studio Code editor window?
I am slightly colour blind, so I would like to change it from red to something else (yellow maybe) to improve accessibility and make it easier for me to read.

Try adding this to your global preferences file:
"workbench.colorCustomizations": {
"editorCursor.foreground": "#ffff00",
"terminalCursor.foreground": "#ffff00"
}
Also worth noting that if you're colourblind, there are probably some colourblind-friendly themes for vscode out there, though I can't say I have looked for them myself.

Related

any way to have a light sidebar while keeping the editor dark?

Something like this:
I've always liked the way Sublime Text looked and I wasn't able to reproduce this sorta theme in VS Code. Editing the workbench settings does not really achieve the same result. I end up having a light text on a slightly darker sidebar: which is pretty hard to read.
These will get you closer:
"sideBar.foreground": "#000",
"sideBar.background": "#ccc",
// "gitDecoration.modifiedResourceForeground": "#000",
You may need to modify all the gitDecoration colors to work on a light background.
I haven't figured out a way to darken the arrows for the folders yet though. You would think they would be set by the sidebar.foreground property but apparently not.
And I just noticed that the sidebar properties also control the command palette colors!

VSCode: Increase opacity of linter warnings

I resently switched to Visual Studio Code as my editor. I installed my favorite theme "Material Theme Palenight High Contrast". I'm in love with it. There is just on problem, that really hinders me when coding on my laptop.
The squiggly lines of the linting error are super dark, because they have opacity.
As you can see here, one can barely see the error below item. Is there a way to change the opacity of linting errors?
EDIT: I tried setting workbench.colorCustomizations but that caused my theme to disappear.
Edit 2: I tried setting the theme specific settings like this:
"workbench.colorCustomizations": {
"[Material Theme Ocean High Contrast]": {
"editorError.foreground": "#ff0000"
}
},
but it didn't work. The color of the squiggly stayed the same.
The instructions on the theme page you linked say to use editor.colorCustomizations, not workbench.colorCustomizations. Have you tried that?
There's also a bit above the link I gave that talks about setting the accent color. They don't define what "accent color" means, so I'm not sure if that color is the thing you're trying to change, but you might try it.
I was able to find a fix. Go to the place where your extensions are installed:
/Users/user-name/.vscode/extensions/extension-name/themes/theme-name.json
In that file find the values for editorError.foreground and editorWarning.foreground. Here you can overwrite their values and it will work.
I'm just asking myself, whether this should be an issue for the VSCode repository? Since setting the settings in the user settings should overwrite this. One shouldn't have to change this .json file. Especially since this will change back again, if you re-install the theme.
Dummy Edit 🤦🏻‍♂️:
Damn, I accidently wrote Oceaning insteand of Palenight. The color customizations work... My bad. No need to do this hacky trick I described above.

VS Code changing modified file colors in Explorer

I am not a huge fan of the peach color in the explorer for modified files. Searching through the color theme reference I can't seem to find an override..
https://code.visualstudio.com/docs/getstarted/theme-color-reference
I've even tried disabling extensions and I am still seeing those predefined colors.. I am using the Monokai Soda theme but that doesn't seem to be what is setting those colors in the sidebar..
Any help appreciated - it's kinda driving me crazy..
ANSWER
Needed a combo of error style and git overrides, see answer below:
"workbench.colorCustomizations": {
"list.errorForeground": "#b3e5ec",
"list.warningForeground": "#00d9ff",
"gitDecoration.modifiedResourceForeground": "#00ffb3",
"gitDecoration.untrackedResourceForeground": "#f7aeae"
}
Turns out that the colour you're seeing isn't due to modified content. It's due to having problems/errors in your file. If you hover over the file name you should see x problems detected in this file.
To change the colour of those, you can use
"workbench.colorCustomizations": {
"list.errorForeground": "#00AA00"
}
The colour for modified files looks like the colour that settings.json is highlighted in, aka light green.

Changing color for Modified Files in VSCode

In VS Code, I want to change the colors of text for my theme. I want to change the color that VS Code makes edited files. I have tried
"workbench.colorCustomizations": {
"[Monokai]": {
"editorOverviewRuler.modifiedForeground": "#ff0000",
"editorOverviewRuler.warningForeground": "#ff0000"
}
}
per the documentation, but that doesn't do anything, and I can't find any other parameters that woulda affect the color specific to files that have been edited and not yet saved or committed to GIT. I do know it can be changed, because that color is different between Monokai and Monokai Alt.
Can anyone help? The color manipulation of this IDE is beyond frustrating.
Alex game me the answer ...
"workbench.colorCustomizations": {
"[Monokai]": {
"gitDecoration.modifiedResourceForeground" : "#ff0000"
}
}
#ff0000 being the color edited files are now marked as in the browser tab

How to change the gutter background colour in VS Code?

All the VS Code default themes (and any others that I've seen) have a uniform background color between the main view and the gutter. This makes it really hard to tell if you're at the start of a line (or to click there). Is the cursor at the start of the line here?
This is especially annoying with Python where indentation matters and you can't simply auto-indent a block once your indentation is messed up.
I often find myself pasting a block only to find that I was one space away from the start of the line and the pasted block therefore being offset.
Simply setting the gutter to a light grey background would fix this problem but looking at the default theme files I can't see any settings for the gutter. I've also looked at a theme from the store (Material) which has a few keys relating to gutter colours but changing them did not do anything.
Is there any way to modify the gutter background colour in VS Code?
Update: Version 1.8 of VS Code comes with a new setting to render the line highlight which can help with this when set to 'gutter':
You can change the gutter's background color (or colour) in settings.json. This was added in May.
"workbench.colorCustomizations": {
"editorGutter.background": "#000000" // your color here
}
or you can add
"editor.rulers": [ 0 ]
This won't change the background but it will add a line between the gutter and the editor.
The problems is that the gutter pointers are just not enabled by default.
Open preferences, workspace settings and set
{
"editor.renderIndentGuides": true,
"editor.renderWhitespace": "all"
}
You should see the guidelines and whitespace, hope it helps.
For more settings like this check -> https://code.visualstudio.com/Docs/customization/userandworkspace
Please install 'Python For VSCode' extension to solve the indentation issue.