DEVSENSE / phptools-docs

PHP Tools public content
Apache License 2.0
79 stars 10 forks source link

Add 1 newline between methods and strip unnecessary newlines #584

Closed Teraskull closed 1 month ago

Teraskull commented 3 months ago

Add one newline between functions/methods:

function a() {
    echo "";
}

function b() {
    echo "";
}
Miloslav commented 3 months ago

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

Miloslav commented 1 month ago

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!

Teraskull commented 1 month ago

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.

Miloslav commented 1 month ago

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