Skip to content

Empty line between if-else-if ladders gets removed thus ruining readablity. #348

@Aspecky

Description

@Aspecky

Lot of times I have these inevitable if-else ladders and it gets a bit hard finding my way through them which is why I leave an blank line before my next elseif so it becomes easier to read, like this:

if true then
    local var = 2
    var += 1
    var += 1
    var += 1
	
elseif true and not true then
    local var = 3
    var += 1
    var += 1
    var += 1
end

But the formatter removes that blank line and kills readability for me, so it becomes like this:

if true then
    local var = 2
    var += 1
    var += 1
    var += 1
elseif true and not true then
    local var = 3
    var += 1
    var += 1
    var += 1
end

And it gets much worse the longer the code is and the longer the ladder is.
I think there should be an option to leave blank lines there for people like me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestrequires optionThis feature request would require option configuration

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions