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

9

7

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 :)

Conduce answered 21/1, 2022 at 16:43 Comment(9)
Did you install any plugin for Flutter in vscode?Watusi
Did you install Dart and Flutter Visual Studio code extensions?Guiscard
is it possible to share some parts of code pictures?. and if you run the code do you have any error on the consoleJez
@YunusKocatas No, I don't face errors in the console, unless I make any code errors, other than that, everything runs smoothly. You can check out the screenshot from this link: imgur.com/a/tBkSAkaConduce
@zabaykal Yes, I did that, and there are still no colours in the snippets or widgets.Conduce
@LuisGurmendez Yes, I did that.Conduce
did you tried the cons value?Jez
@YunusKocatas Where can I get this Cons Value?Conduce
i mean const value in your code comes after padding !Jez
C
3

This issue was fixed, once I updated VS code and restarted it. The text colour for every widget and class was back after that.

Conduce answered 5/2, 2022 at 8:11 Comment(0)
A
59

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 theme

Dark+

Dark+ theme


To Change This Settings;

Setting Icon > Color Theme > Select Dark+ Configuration;

Change Theme Settings

Dark+ Configuration

Arbitral answered 4/2, 2022 at 7:35 Comment(4)
Thank you for the reply, I tried that and did not work. But anyway this issue got fixed when I uploaded the VS code and restarted it. :)Conduce
Save my day thanks DUDEE!!!Busyness
Made my whole year. THANK YOUDjokjakarta
Great Thank you @Danny. I tried asking same to ChatGPT and he could not give me the right answer but your post did. Human experience is best ;pVinia
B
19

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.

Baba answered 17/11, 2022 at 12:25 Comment(2)
Uninstalling JavaScript and TypeScript Nightly (v5.0.20221117) restored the syntax highlighting colors. Reinstalling it caused JavaScript and TypeScript to go white (except for parentheses and brackets). I'm leaving this extension uninstalled, it just replaces VS Code's built-in TypeScript.Bimah
In my case the JavaScript and TypeScript Nightly extension had a "Restart Required" button. Clicking this solved my issue. No need to uninstall it. Thanks for the tipLorolla
C
3

This issue was fixed, once I updated VS code and restarted it. The text colour for every widget and class was back after that.

Conduce answered 5/2, 2022 at 8:11 Comment(0)
S
0

I am not using VS but you might try to add Flutter and Dart extension from marketplace.

Serge answered 21/1, 2022 at 16:45 Comment(1)
I have already installed all the plugins like flutter and dart. Everything works fine except there are no colours or code suggestions.Conduce
A
0
  1. In VS Code, open the Color Theme picker with File > Preferences > Color Theme. (Code > Preferences > Color Theme on macOS).
  2. You can also use the keyboard shortcut Ctrl+K Ctrl+T to display the picker.
  3. Use the cursor keys to preview the colors of the theme.
  4. Select the theme you want and press Enter.
Alacrity answered 21/1, 2022 at 16:48 Comment(2)
I don't have any issue with the theme, All of the codes I have written are in white. I need colours in the codes for a better understanding.Conduce
If you change the theme it will automatically change the code color. Different themes have different code colors.Alacrity
T
0

You can try installing "Flutter Widget Snippets" for already written code snippets from VS code Extensions.

Tautog answered 21/1, 2022 at 16:52 Comment(2)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Quasimodo
I am using this extension, Still figuring out, how can I fix this.Conduce
C
0

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.

Caseation answered 17/11, 2022 at 13:1 Comment(0)
P
0

The plugin developed by OmniSharp (https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp) is being installed to develop in C# language. Here is the C# plugin; Occasionally, there may be annoying situations that I think are caused by the caching design of the plugin. (For example; the situation that occurs after a class is moved from one place to another, the class cannot be defined where it is used, or intellisense does not work). To solve this, check if there is Omnisharp with Ctrl+Shift+P and download it.

Porosity answered 4/8, 2023 at 12:45 Comment(0)
M
0

There is a chance that the problem lies in VS Code not recognizing the file type. In that case, just select the file type from Change Language Mode (this happens if something is generated or dragged and dropped).

Mirellamirelle answered 30/9 at 15:29 Comment(1)
You can also change the file type by clicking at the current file type at the lower right corner on the status bar: code.visualstudio.com/Docs/languages/…Seasickness

© 2022 - 2024 — McMap. All rights reserved.