Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dart syntax highlighting is not highlighting dart code

I have installed dart(Syntax highlighting only) extension but it is not highlighting my dart code.I have restarted my VS code several times after installing extension but couldn't get this to work. Someone please let me know the issue and how can I resolve this.

Below is my VS code screenshot:

vs

THANKS

like image 410
Digvijay Avatar asked Jan 19 '19 23:01

Digvijay


People also ask

How do I enable Dart code in Visual Studio?

Open Visual Studio Code, then press the Extensions icon (or press Ctrl+Shift+X), and find extension(s) with the keyword "dart" as illustrated below. You will see the Dart Code Extension appear in the first position in the results. Now, press "Install" for installation.

Can I code Dart in VSCode?

With the Dart plugin, you can use Visual Studio Code (VS Code) to develop Dart apps. The Flutter site has details on how to set up and use VS Code for Flutter apps.

How do I run a Dart code in terminal?

To run the app from the command line, use the Dart VM by running the dart run command in the app's top directory: $ cd cli $ dart run Hello world: 42! If you want to run the app with debugging support, see Dart DevTools.


1 Answers

As mentioned in the comments, you don't need the "Syntax highlighting only" extension if you have the Dart one, since the Dart one includes the same syntax highlighting.

Based on your screenshot, it seems like syntax highlighting is working fine - I can see multiple colours. 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

like image 163
Danny Tuppeny Avatar answered Oct 22 '22 08:10

Danny Tuppeny