Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle double-indent followed by double-outdent #85

Open
TwitchBronBron opened this issue Jan 30, 2024 · 0 comments · May be fixed by #89
Open

handle double-indent followed by double-outdent #85

TwitchBronBron opened this issue Jan 30, 2024 · 0 comments · May be fixed by #89

Comments

@TwitchBronBron
Copy link
Member

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 }
}
@TwitchBronBron TwitchBronBron linked a pull request Apr 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant