Whole line highlight in teal colour in visual studio code? Teal colour - visual-studio-code

enter image description hereThe teal colour highlighted in visual studio code on whole line in the background of code, which is annoying me and my eyes. How to remove the colour on entire line.
I tried in YouTube and googling it but couldn't find answer. Please help me out

It looks like you have installed the 'error lens' extension in vs code, please uninstall it

this is a dart analysis warning. either you clear the error by:
using const constructor on the widget, on this case is the MaterialApp, since you don't have any changed parameters on the widget:
...
const MaterialApp(
...
),
...
or,
using VSCode's Quick Fixes and ignoring the errors, like so:

Related

Why there are no colors in the code text in Visual Studio Code?

Code Text Colorless
When I code in Visual Studio, it doesn't show any colours in the code text. It shows blue and green colours only for the class and comments texts. Also, VS doesn't suggest me anything when I code. Apart from this, everything things run fine and if there are any errors it shows up in the problem section.
I am doing flutter/ dart
I would really appreciate it if anyone helps me sort it out.
Thank you :)
Happened to me today, hope it helps someone: in my case it was just a broken extension JavaScript and TypeScript Nightly from Microsoft. After uninstalling, everything went back to normal.
I think the issue is likely the VS Code theme you're using. Dark (Visual Studio) only shows limited colours - try changing it to Dark+ and you should see more colours.
Dark
Dark+
To Change This Settings;
Setting Icon > Color Theme > Select Dark+ Configuration;
This issue was fixed, once I updated VS code and restarted it. The text colour for every widget and class was back after that.
I am not using VS but you might try to add Flutter and Dart extension from marketplace.
In VS Code, open the Color Theme picker with File > Preferences > Color Theme. (Code > Preferences > Color Theme on macOS).
You can also use the keyboard shortcut Ctrl+K Ctrl+T to display the picker.
Use the cursor keys to preview the colors of the theme.
Select the theme you want and press Enter.
What worked for me was checking if I had any deprecated or problems with an extension. Go to extensions in vs code (or ctrl+shift+x) check if any of your installed extensions has a problem; a warning yellow sign should appear below if your extension is deprecated or has any other problem. Fix the faulty extensions.
You can try installing "Flutter Widget Snippets" for already written code snippets from VS code Extensions.

Can I change the color of a variable in VS code?

I'm just a beginner in development.
I used android studio while listening to Flutter lectures.
Now I am trying to change to VS Code, but there is a problem.
In Android Studio, if you declare a variable, the variable will be highlighted in purple later.
This is displayed in purple.
In VS Code
It is difficult to distinguish because it is just white as above.
If anyone knows how to change this, please.
thank you.
When I searched, it seems that Dart has updated the function, but it does not apply. And the default theme doesn't work either. Material theme is installed. And I went into Setting.json and applied only the variable color separately to solve it.
"editor.tokenColorCustomizations": {
"variables": "#9a6dce",

In the Neon Night VSCode theme, how does he do error dashes instead of squiggles?

I love the dash effect instead of the squiggles in the Neon Night VSCode theme, but some of the ui colors are a little bright for me. Anyone know how it is achieving the effect? I'm trying to apply the effect to a different theme, and have even downloaded/combed through the GH repo, but haven't managed to figure it out. My apologies if this has already been asked. If my google-fu is broken, please be kind.
Theme author here, this was also posted as an issue on the repo and I wrote the response on the issue.
Here's what I shared...
You want to use these selectors:
editorError.foreground: error squiggles
editorWarning.foreground: warning squiggles
editorInfo.foreground: info squiggles
https://github.com/chaseadamsio/vscode-theme-neon-night/blob/mainline/src/colors/editor.js#L42-L45
you can set these on your workbench too (so you can use your favorite theme without forking) by adding them to your settings.json like this:
{
"workbench.colorCustomizations": {
"editorError.foreground": "#f00"
}
}
You can read more about them here and search for "Errors and warnings".
I found the 'offending color'.
"editorUnnecessaryCode.border": "#FF8E8E"
I found this by binary elimination of the theme entries.
I think it is implemented with a text Decorator, because I could not find as a style of the span with the Developer Tools of VSC.
The dash decoration is usually created by the semantic code check. Squiggles are the result of syntactic checks. So it's not a theme speciality and would appear similar with other themes.
Hover with the mouse over the dash decoration to see what vscode suggests to do.

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.

Change error highlight color in vs code

I build a project and get some problems in the "Problems view", I click on the problem to see a line of code with that problem highlighted.
And it gets highlighted indeed. However, if dark-styled theme is used, highlight is, for me at least, really hard to notice (line 23 is highlighted):
I guess this color can't be simply hard-coded somewhere since it's different in, for example, red theme and light-styled themes:
Is there a way to change this color?
UPD: This question is not a duplicate of "change the error style"; error style (squiggle) applies to all errors at once, my question is about highlighting only the selected error.
Apparently, you can actually change it without using an extension. I created an issue and got the answer that this color is called editor.rangeHighlightBackground and you can override it in your User Settings (settings.json) by:
{
"workbench.colorCustomizations": {
"editor.rangeHighlightBackground": "#00AA00"
}
}
To open User Settings just use Cmd+, on mac or Ctrl+, on windows
A wrapup answer:
For VS Code 1.52+
You can use this snippet to customize error colors:
"workbench.colorCustomizations": {
"editorError.background": "#ff80ab66",
"editorError.foreground": "#d50000",
}
Available properties: https://code.visualstudio.com/api/references/theme-color
Check if you can apply a different theme with VSCode 1.52 (Nov. 2020), considering the new feature:
Error background colors
Theme authors can now leverage new theme colors for errors in the editor.
Edior errors, warnings, and infos can now be styled via:
editorError.background
editorWarning.background
editorInfo.background