.gluafmtrc.json is validated against
glua.bluejutzu.dev/schemas/gluafmtrc.schema.json,
the same schema glua init and GLua: Create Formatter Config File point
$schema at. This page documents every property it accepts. See the
Formatter page for what each option actually changes in
your code, and Config Files for a shorter
overview alongside .glua.json.
The schema sets
additionalProperties: false, so a typo’d key is flagged in your editor rather than silently ignored.Properties
URL of the JSON schema for this file. Written automatically by
glua init and the VS Code command.Spaces per indent level — and, when
useTabs is on, the assumed display width of a tab for measuring line length.Preferred string quotes. A string is only rewritten when doing so needs no extra escaping.
"lua" rewrites GLua’s C-style operators != && || ! as ~= and or not.Write
func( a, b ) instead of func(a, b) — the style used across the Garry’s Mod wiki.Keep blocks written on one line on one line, e.g.
if not IsValid(ent) then return end. See idiomatic one-liners.Per-path formatting overrides, applied in order; later entries win — see below.
overrides
An array of objects, applied in order — later entries win when two overrides
match the same file. Unlike .glua.json’s overrides, options is required
and only accepts formatting keys — no diagnostics or globals here.
Glob patterns relative to this file’s directory, e.g.
lua/vendor/**. At least one entry.A subset of the top-level properties above (excluding
$schema and overrides) to apply to matching files.Options not listed in an override keep whatever the top-level config (or the built-in default) says — an override only replaces the keys it names.