Completions on named arguments should include trailing comma
See original GitHub issueRepro steps:
- Create a new Flutter project in IJ
- In
main.dart
place the cursor at the end of line 77 (title: new Text(config.title),
) - Press Enter to add a new line
- Type
back
and then Enter to select thebackgroundColor
completion
Expected result:
- Editor completes to
backgroundColor: ,
and the caret is placed just before,
- The completed line is properly indented
Actual result:
- Editor adds just
backgroundColor:
resulting in the completed code triggering an analyzer error - Line is not properly indented
Issue Analytics
- State:
- Created 7 years ago
- Comments:16 (16 by maintainers)
Top Results From Across the Web
[VSCode] Trailing comma after inserting named parameter.
The guideline for adding a trailing comma is simple: Always add a trailing comma at the end of a parameter list in functions,...
Read more >Code Syntax Style: Trailing Commas - ReSharper - JetBrains
When multiple items are separated by the comma (object, array, and collection initializers, as well as enums and switch expressions) , C# ...
Read more >Why can the code be compiled when I add a redundant ...
One of the main reasons behind trailing commas - using them reduces the amount of lines you need to update when the list...
Read more >Allowing trailing commas in argument lists - Swift Forums
1. Support trailing commas only in multi-line argument and tuple declarations. This is an interesting approach, and would codify good practice ...
Read more >Trailing commas - JavaScript - MDN Web Docs
Trailing commas (sometimes called "final commas") can be useful when adding new elements, parameters, or properties to JavaScript code. If you want to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
WIP (https://codereview.chromium.org/2839273002/):
Implemented w/ https://github.com/dart-lang/sdk/commit/bfc071e515808221f924623dd35fdc14040e1e39.