iamcco / coc-flutter

flutter support for (Neo)vim
472 stars 38 forks source link

Language server not supported error on Flutter master #166

Closed exaby73 closed 1 year ago

exaby73 commented 1 year ago

Flutter master seems to break the analyzer. It throws errors related to the language server not supporting go to definition, hover, etc.

Steps to reproduce the behavior:

  1. Use Flutter master (I use FVM)
  2. Open a new Flutter project and try to trigger hover or go to definition and notice errors
Flutter version reproduced on
Flutter 3.7.0-5.0.pre.26 • channel master • https://github.com/flutter/flutter.git
Framework • revision 437f6f86ec (2 hours ago) • 2022-12-12 01:46:41 -0500
Engine • revision 9e37c98836
Tools • Dart 3.0.0 (build 3.0.0-12.0.dev) • DevTools 2.20.0

Expected behavior Able to use lsp features

Screenshots

Example of trying to trigger hover

image

Output channel:

  1. Set "flutter.trace.server": "verbose"
  2. Restart coc using :CocRestart
  3. Reproduce the issue
  4. :CocCommand workspace.showOutput open output list and select flutter

Paste Log from above:

No logs

Config If you have any config for this specific extenstion in you coc-settings please include them here.

    "[dart]": {
        "coc.preferences.formatOnSave": true
    },
brainwo commented 1 year ago

Had this issue after updating to Flutter 3.7.0 with Dart 2.19.0 and remove Dart from system package manager. Fixed the problem by reinstalling Dart 2.18.6 from system package manager. No idea what caused the problem, Dart 2.18.6 is the current latest on Arch repository. Trying to change the Dart lookup setting brings no luck.

brainwo commented 1 year ago

I confirm this works with Dart 2.19.2 from system package manager. It seems I misunderstood how flutter.sdk.dart-lookup and flutter.sdk.dart-command works as I put the full path of the dart executable and the extension didn't start analyzing my project.

Kavantix commented 1 year ago

Dart 3 should work now, if not let me know and I'll reopen