Skip to content

handle double-indent followed by double-outdent #85

@TwitchBronBron

Description

@TwitchBronBron

The formatter should prevent multi-indent when followed by multi-outdent. In this case, we have { and function, then on another line } followed by end function

This will require a lookahead to figure out if we're doing to outdent the same number of indents.

temp = {
	key_9: { env: ["any"], themes: ["any"], runtimeCheck: function() as boolean
			return true
	end function }
	key_10: { env: ["any"], themes: ["any"], runtimeCheck: function() as boolean
			return false
	end function }
	key_11: { env: ["dev"], themes: ["any"], runtimeCheck: function() as boolean
			return true
	end function }
	key_12: { env: ["any"], themes: ["any"], runtimeCheck: function() as boolean
			return true
	end function }
}

Should be:

temp = {
	key_9: { env: ["any"], themes: ["any"], runtimeCheck: function() as boolean
		return true
	end function }
	key_10: { env: ["any"], themes: ["any"], runtimeCheck: function() as boolean
		return false
	end function }
	key_11: { env: ["dev"], themes: ["any"], runtimeCheck: function() as boolean
		return true
	end function }
	key_12: { env: ["any"], themes: ["any"], runtimeCheck: function() as boolean
		return true
	end function }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions