A Lua Beautifier that actually works

After days of searching, I found the perfect Lua Beautifier that can clean up your lines and etc. This is a very useful tool for beginners and scripters that just have one of the messiest codes.

Example of what it does:

And how I used it:

Before:

After:


(UPDATE)
This post has gotten lot of attention over time and I guess it’s time to inform people that this is actually a feature inside Roblox now added sometime in late 2020.

GFD

44 Likes

I might use this when a GitHub repo uses spaces instead of tabs. Would make it much easier to standardize their annoying code.

Thanks for sharing!

6 Likes

Shameless self plug but I actually forked and updated stravant’s beautifier/minifier a while back. Here’s the source on GitHub: https://github.com/Rerumu/lua-minify
Here’s the Roblox plugin I made for it: https://www.roblox.com/library/2744793551/Minify

It has some options sliders and fancy stuff like constant folding if you want to use those too.

19 Likes

I have used this before, and working on projects with friends who write messy code (@tronP, this means you) is no longer a hassle. There is a character limit, which is the only issue that I have encountered with this. Might even port this to a plugin in studio down the line, who knows?

3 Likes

Please do dm me the plugin when you have finished it!

It’s sad that Stravant’s plugin is outdated now but it really didn’t “beautify” what I needed tbh

Woah! That’s actually amazing because I use this website too. So, I can format my Lua scripts. :smiley:

1 Like

I think theres a misunderstanding here.

I prefer tabs. They’re much cleaner, 1 keypress instead of 4, yada yada let’s not do the tabs vs spaces debate here.

Sometimes I’ll find a nice module or repo that I want to use or modify, by its written with spaces.
A beautifier would make it easy to switch them to a format I’m more comfortable with.

11 Likes

I love the composition to this!