Abir Hasnat
Abir Hasnat

Reputation: 137

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

Upvotes: 9

Views: 72300

Answers (10)

MQuiggGeorgia
MQuiggGeorgia

Reputation: 769

Solved the problem here by simply reloading VS Code. Handy extension for this is called, appropriately, Reload.

enter image description here

Upvotes: 1

sannoun damma
sannoun damma

Reputation: 1

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

Upvotes: 0

ayddnuh
ayddnuh

Reputation: 1

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.

Upvotes: 0

Roberto Espinoza
Roberto Espinoza

Reputation: 1

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.

Upvotes: 0

Max Tuzenko
Max Tuzenko

Reputation: 1358

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.

Upvotes: 20

Abir Hasnat
Abir Hasnat

Reputation: 137

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

Upvotes: 3

Danny Tuppeny
Danny Tuppeny

Reputation: 42343

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

Upvotes: 62

Ojash Gurung
Ojash Gurung

Reputation: 11

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

Upvotes: 0

Ashraful Alam
Ashraful Alam

Reputation: 11

  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.

Upvotes: 1

Tolga Yılmaz
Tolga Yılmaz

Reputation: 518

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

Upvotes: 0

Related Questions