cnwizards icon indicating copy to clipboard operation
cnwizards copied to clipboard

[Feature request] Formatter - align comment to next statement

Open Sorien opened this issue 10 years ago • 2 comments

before format

procedure foo()
begin
  begin
  //comment
  begin
  end;
  end;
end;

after format

procedure foo()
begin
  begin
  //comment
    begin

    end;
  end;
end;

should be

procedure foo()
begin
  begin
    //comment should be aligned to next statement
    begin

    end;
  end;
end;

Sorien avatar Sep 18 '15 08:09 Sorien

In fact, we can't make the decision whether the line comment belongs to previous line or next line. It depends on the coding style.

shanzhashu avatar Sep 21 '15 06:09 shanzhashu

so maybe you could add some settings for it :).

Sorien avatar Sep 21 '15 07:09 Sorien