WikiQueer:Lua style guide

Whitespace
And the Lord spake, saying: Thou shalt indent with four spaces, no more, no less. Four shalt be the number of spaces thou shalt indent, and the number of the indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right out. Use 4 spaces for the indent, and never use tabs. WikiQueer's code editor uses 4 space indent by default. Try to limit the length of a single line, so people with smaller monitors can read the code easily.

Avoid extraneous whitespace when calling a function or subscripting an array or dictionary. No spaces should be used immediately before or inside a bracketing character ([, (, { and their matches)

Control flow
Putting multiple statements on one line is discouraged, unless the expression is very short. Try to avoid this with multi-clause statements, too.

If a single line would be too long, you can split a large statement over multiple lines with a hanging indent that aligns with the opening delimiter. For if statements, the conditions should be placed on the next line.

Naming conventions
Define the entry method as simply unpacking the parameters from the frame, and then passing those through a function with the same name prefixed with a single underscore. This can be disregarded if the function is short and simple.

In the standard library, function names consisting of multiple words are simply put together (eg setmetatable). camelCase is the preferred way to name functions, in order to avoid potential garden path function names.