question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Completions on named arguments should include trailing comma

See original GitHub issue

Repro steps:

  1. Create a new Flutter project in IJ
  2. In main.dart place the cursor at the end of line 77 ( title: new Text(config.title),)
  3. Press Enter to add a new line
  4. Type back and then Enter to select the backgroundColor 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:closed
  • Created 7 years ago
  • Comments:16 (16 by maintainers)

github_iconTop GitHub Comments

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found