How to auto-format code?

is there a hotkey that cleans the code? I always add “;” at end of line lol
And I don’t use those spaces in normal operations. But it looks way better if you have them. But I’m to lazy to add them by myself, so I wonder if there is an auto-formater for the code

1 Like

If you use Atom you could install this package to beautify your code: Sunsetting Atom - The GitHub Blog

You could also use a site like this Lua-beautify by blackmiaool

I believe the semi-colon is only required if you are putting multiple statements on one line.

1 Like

Please don’t put ; at the end of your Lua lines. :slight_smile:

3 Likes

Nope. You can put multiple statements on a single line without using a semicolon. But it is not really recommended. Code readability will suffer.

3 Likes