Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VsCode Dart code highlighting wrong colors

I have a very strange issue. After upgrading Flutter yesterday to the newest version, my syntax highlighting is awfully off. When I open a file, everything seems fine, but as soon as the file is analyzed and the result is used for highlighting, everything breaks.

Correct (for 1-2 seconds after opening the file): Correct colors

Wrong (after around 2 seconds): Wrong colors

I am using the Monokai Theme for VsCode. I would love to get my old coloring back, as I think the new scheme is outrageously difficult to look at.

My Flutter Doctor outpu (All versions etc.):

[flutter] flutter doctor -v
[√] Flutter (Channel stable, 2.0.3, on Microsoft Windows [Version 10.0.19042.867], locale en-NZ)
    • Flutter version 2.0.3 at R:\Programme\Flutter
    • Framework revision 4d7946a68d (3 days ago), 2021-03-18 17:24:33 -0700
    • Engine revision 3459eb2436
    • Dart version 2.12.2

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at R:\Programme\Android\sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: R:\Programme\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 4.0)
    • Android Studio at R:\Programme\Android\Android Studio
    • Flutter plugin version 48.1.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] IntelliJ IDEA Ultimate Edition (version 2020.3)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2019.2.2
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart

[√] VS Code, 64-bit edition (version 1.54.3)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.20.0

[√] Connected device (2 available)
    • Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.90
    • Edge (web)   • edge   • web-javascript • Microsoft Edge 89.0.774.57

• No issues found!
exit code 0

Any help would be greatly appreciated :)

like image 921
Coronon Avatar asked Mar 21 '21 13:03

Coronon


People also ask

How do I change syntax highlighting in Vscode?

To change the text and syntax colors in visual studio code follow the steps given below: Open VS Code editor to change the syntax colors. Go to Settings, which is on the bottom left corner of the VS Code window. In the search field type JSON, and click on the 'Edit in settings.

How do you format a dart code in VS code?

Automatically formatting code in VS Code To automatically format the code in the current source code window, right-click in the code window and select Format Document . You can add a keyboard shortcut to this VS Code Preferences. To automatically format code whenever you save a file, set the editor.


Video Answer


1 Answers

Add "editor.semanticHighlighting.enabled": false in your vscode settings.json

like image 129
Yuen Sun Neoh Avatar answered Oct 28 '22 19:10

Yuen Sun Neoh