Reputation: 661
I'm using Dart Code extension on VS Code while working on Flutter projects. I'm unable to add parenthesis and tab over parameters of a function on autocomplete.
Refer to this screen recording to see the problem in action.
And this to see the expected behavior. This is a simple console.log()
statement that has parenthesis completed after accepting the autocomplete suggestion.
Insert Argument Placeholder option
is enabled and enableCompletionCommitCharacters
option is disabled.
VS Code version: 1.49.2
Dart extension version: 3.14.1
Dart/Flutter SDK version: Dart - 2.9.2 / Flutter - 1.20.4
Upvotes: 1
Views: 669
Reputation: 42353
This functionality was initially missing from the LSP implementation (I presume you have dart.previewLsp
enabled), though has recently been implemented (as a new setting dart.completeFunctionCalls
that will supersede the original settings you mentioned):
https://github.com/Dart-Code/Dart-Code/issues/2823
You'll need an updated SDK to get this though (though it hasn't currently made a stable SDK, so it may only be on master/dev channels).
Upvotes: 2