dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.26k stars 1.58k forks source link

Feature request: Distinguishable `class`, `mixin`, `abstract class` syntax highlighting #36450

Open gaplo917 opened 5 years ago

gaplo917 commented 5 years ago
flutter --version
Flutter 1.2.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 8661d8aecd (7 weeks ago) • 2019-02-14 19:19:53 -0800
Engine • revision 3757390fa4
Tools • Dart 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

OS: MacOS 10.14.3

Incentive

Most of the languages(i.e. Java, Scala, Kotlin, Swift) can specify a different syntax highlighting color on Interface,class, abstract class, protocol in Intellij IDE.

Example: Kotlin

Screenshot 2019-04-03 at 1 01 59 PM

Become Inefficient when reading codes that are written by others

without this feature, Coder will lose a lot of valuable information that can improve productivity.

Source

Screenshot 2019-04-03 at 1 02 20 PM

Case 1

Source

Screenshot 2019-04-03 at 1 35 18 PM

Case 2

Source

Screenshot 2019-04-03 at 1 35 30 PM

Case 3

Source

Screenshot 2019-04-03 at 1 35 44 PM

Case 4

Source

Screenshot 2019-04-03 at 1 35 59 PM

IDE Features Request

I submitted "Feature request: Dart syntax highlight enhancement for mixin & abstract class" and got responded that they use Dart Analysis Server to do syntax highlight.

Dart code highlighting is powered by the Dart Analysis Server, a tool from the Dart SDK. IDE only highlights what the server tells it to highlight. The variety of highlighting types is also managed by the server. Current server API doesn't have separate highlighting types for mixins and abstract classes. See HighlightRegionType definition.

You might want to file a request in the Dart SDK's issue tracker and paste a link to the issue here. Once it's done on the server end we'll be able to support it on the Dart plugin end. -- Alexander Doroshko 1 Apr 2019 17:34

Ref: https://youtrack.jetbrains.com/issue/WEB-37951?p=IDEA-209533

Disclaimer: I have built an universal color scheme for Intellij IDEs across different languages.

alexander-doroshko commented 5 years ago

@kevmoo, I think area-analyzer would be the right label here. See my comment quoted at the end of the issue description.