You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Autocomplete not inserting parentheses or arguments for some items #2992
Thanks - tracked this down. We're not currently supported this for things that come via SuggestionSets. I'd actually accidentally fixed this while implementing something else, but that change is not ready to land yet, so I've extracted the fix t o its own change.
I guess it is a related issue that parenthesis are not added for example to ChangeNotifier.notifyListeners()? This stopped working today after I upgraded Dart Code to the latest version (and enabled LSP).
So this will be fixed too by dart-lang/sdk@2f2f9fc? I guess it will take months before that will be available in Flutter stable, so are there any workarounds? I think this is quite an annoying issue, I already wrote some bugs due to this, see dart-lang/sdk#58281.
I just tested it on a recent Flutter master and I'm getting parens accepting notifyListeners with dart.completeFunctionCalls enabled, so I believe it's either fix by that change (or the previous one that first added the functionality).
are there any workarounds?
You could either switch back from LSP, or use a different Flutter channel. Unfortunately I don't believe there are any other workarounds. The LSP functionality is not complete in current Flutter stable (this is the reason it's still behind the preview flag). LSP won't be made default until after these fixes all make the Flutter stable channel, though I'd encourage using LSP if there's nothing breaking to you to help identify any remaining issues/gaps. If this is sufficiently annoying, I would recommend switching back.
Activity
DanTup commentedon Dec 7, 2020
Thanks - tracked this down. We're not currently supported this for things that come via SuggestionSets. I'd actually accidentally fixed this while implementing something else, but that change is not ready to land yet, so I've extracted the fix t o its own change.
https://dart-review.googlesource.com/c/sdk/+/175251/
[Analyzer] Support completeFunctionCalls for LSP SuggestionSet comple…
DanTup commentedon Dec 7, 2020
Fixed by dart-lang/sdk@2f2f9fc.
Merrit commentedon Dec 7, 2020
Awesome!
Thank you for all your hard work Danny, very much appreciated 🎆
kinex commentedon Dec 8, 2020
I guess it is a related issue that parenthesis are not added for example to
ChangeNotifier.notifyListeners()? This stopped working today after I upgraded Dart Code to the latest version (and enabled LSP).So this will be fixed too by dart-lang/sdk@2f2f9fc? I guess it will take months before that will be available in Flutter stable, so are there any workarounds? I think this is quite an annoying issue, I already wrote some bugs due to this, see dart-lang/sdk#58281.
DanTup commentedon Dec 8, 2020
If you're on the Flutter stable channel, it seems likely. Support for
dart.completeFunctionCallsis not yet available in Flutter's stable channel.I just tested it on a recent Flutter master and I'm getting parens accepting
notifyListenerswithdart.completeFunctionCallsenabled, so I believe it's either fix by that change (or the previous one that first added the functionality).You could either switch back from LSP, or use a different Flutter channel. Unfortunately I don't believe there are any other workarounds. The LSP functionality is not complete in current Flutter stable (this is the reason it's still behind the preview flag). LSP won't be made default until after these fixes all make the Flutter stable channel, though I'd encourage using LSP if there's nothing breaking to you to help identify any remaining issues/gaps. If this is sufficiently annoying, I would recommend switching back.