mago icon indicating copy to clipboard operation
mago copied to clipboard

Formatting option to not have empty line between two of the same symbols & declare()

Open trymeouteh opened this issue 7 months ago • 0 comments

🚀 Describe the Feature

The empty_line_after_symbols and empty_line_after_declare formatting setting can toggle weather to have an empty line after a symbol (class, enum, interface, trait, function, const) or a declare() statement.

However when enabled, they also will add an empty line between two of the same symbols. I would like to have the option to not add an empty line between two of the same symbols.

✅ Use Case / Example

Would allow for formatting code where constants are all grouped together without empty lines between each constant.

💡 Proposed Solution

For example if you have this code...

const A = 1;
const B = 2;

It will be formatted to this, adding an empty line between the two const symbols.

const A = 1;

const B = 2;

Please add a setting to not add a line break between two of the same symbols and between two declare() statements.

📌 Priority

Nice to have

📝 Additional Context

No response

trymeouteh avatar Jul 10 '25 19:07 trymeouteh