phptools-docs icon indicating copy to clipboard operation
phptools-docs copied to clipboard

Add 1 newline between methods and strip unnecessary newlines

Open Teraskull opened this issue 1 year ago • 1 comments

Add one newline between functions/methods:

function a() {
    echo "";
}

function b() {
    echo "";
}

Teraskull avatar Jun 28 '24 15:06 Teraskull

Thank you for the suggestion. We will add format settings to achieve that soon.

Miloslav avatar Jul 04 '24 13:07 Miloslav

Hello,

This can be configured in the latest release:

"php.format.rules.blankLinesBeforeMethod": 1,
"php.format.rules.blankLinesAfterMethod": 1,
"php.format.rules.blankLinesBeforeFunction": 1,
"php.format.rules.blankLinesAfterFunction": 1,

We've also added more blank lines related settings https://docs.devsense.com/en/vscode/editor/customize-formatting#blanklines

Thanks again for the suggestion!

Miloslav avatar Aug 16 '24 13:08 Miloslav

Thanks a lot!

Small nit, some descriptions are confusing or contradict the heading:

image

Noticed it with a few others too before, not sure if those were fixed already.

Teraskull avatar Aug 16 '24 14:08 Teraskull

Thank you for noticing! We'll fix that and check the others.

Miloslav avatar Aug 16 '24 14:08 Miloslav