Let's say I type in the following code and format it.
if (condition) { /* Hello! */ }
If this is C# code, it is formatted like this:
if (condition)
{
// Hello!
}
If it is JavaScript, VSCode formats it like this:
if (condition) {
// Hello!
}
So how can I use the first formatting style (curly braces on new lines) for all languages? I can't find a setting or something similar. Suggestions?
{
on next line. The famous example isreturn {a: 'b'};
, here{
is on the next line ofreturn
. when semicolon is added the same statement is treated asreturn;
and next line{..
which results in returningundefined
when you expect object, read more #2846783 and jamesallardice.com/… – Winniedartfmt
on your code. Formatting in Dart is not a personal choice. – Mall