flutter-intellij icon indicating copy to clipboard operation
flutter-intellij copied to clipboard

Hightlight not work on flutter sdk code

Open voiddog opened this issue 5 years ago • 10 comments

The project code is highlighted, the sdk source code is not highlighted.

project code

flutter sdk source code

Version info

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel unknown, v1.0.0, on Mac OS X 10.14.3 18D109, locale zh-Hans-CN)
[!] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses
[!] iOS toolchain - develop for iOS devices (Xcode 10.1)
    ! CocoaPods out of date (1.5.0 is recommended).
        CocoaPods is used to retrieve the iOS platform side's plugin code that responds to your plugin usage on the Dart
        side.
        Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS.
        For more info, see https://flutter.io/platform-plugins
      To upgrade:
        brew upgrade cocoapods
        pod setup
[✓] Android Studio (version 3.3)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] IntelliJ IDEA Ultimate Edition (version 2018.3.5)
[✓] VS Code (version 1.31.1)
[✓] Connected device (1 available)

! Doctor found issues in 2 categories.

voiddog avatar Feb 27 '19 03:02 voiddog

Hmm, I see highlighting in both examples in those screenshots. Can you provide a bit more context, or perhaps show a file in the sdk, including a build() method?

devoncarew avatar Mar 01 '19 18:03 devoncarew

@devoncarew, the 2nd screenshot (scaffold.dart) contains only lexer-level highlighting (it comes from the Dart plugin lexer) but no highlighting from Analysis Server. In the latter case, we'd see references in doc comments (like [Scaffold]) highlighted. So far I failed to reproduce the issue.

alexander-doroshko avatar Mar 02 '19 09:03 alexander-doroshko

As @alexander-doroshko say, the 2nd screenshot is the source file in sdk

voiddog avatar Mar 02 '19 09:03 voiddog

I'm not able to reproduce either.

@voiddog: is updating your Flutter install an option? I'd be curious if this persists on the latest?

pq avatar Mar 04 '19 22:03 pq

@pq Updating the flutter sdk or intelij idea flutter plugin?

voiddog avatar Mar 08 '19 06:03 voiddog

Sorry @voiddog, I meant you Flutter SDK.

https://flutter.dev/docs/development/tools/sdk/upgrading#upgrading-the-flutter-sdk-and-packages

Thanks for following up!

pq avatar Mar 08 '19 14:03 pq

I try to update my flutter to v1.2.0, but did not work.

Here is my flutter doctor:

[✓] Flutter (Channel unknown, v1.2.0, on Mac OS X 10.14.3 18D109, locale zh-Hans-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses
[!] iOS toolchain - develop for iOS devices (Xcode 10.1)
    ! CocoaPods out of date (1.5.0 is recommended).
        CocoaPods is used to retrieve the iOS platform side's plugin code that responds to your plugin usage on the Dart
        side.
        Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS.
        For more info, see https://flutter.io/platform-plugins
      To upgrade:
        brew upgrade cocoapods
        pod setup
[!] Android Studio (version 3.3)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] IntelliJ IDEA Ultimate Edition (version 2018.3.5)
[✓] VS Code (version 1.31.1)
[!] Connected device
    ! No devices available

I can jump to the defintion by ctrl+click, but the hightlight not work.

voiddog avatar Mar 09 '19 05:03 voiddog

Any progress? I found some different things below:

The picture left doesn't have Dart Packages (witch sdk source code is not highlighted), and the right project has Dart Packages. The flutter sdk source code is in Dart Packages

voiddog avatar Apr 02 '19 06:04 voiddog

The left project is a flutter plugin, right is a flutter application

voiddog avatar Apr 02 '19 06:04 voiddog

This can be only reproduced with plugin, neither package nor project has the same issue.

Plugin Others
image image

FYI @pq

AlexV525 avatar Feb 22 '22 08:02 AlexV525