Stylua Config
Stylua configuration
| Type | object |
|---|---|
| File match |
.stylua.toml
stylua.toml
|
| Schema URL | https://catalog.lintel.tools/schemas/schemastore/stylua-config/latest.json |
| Source | https://www.schemastore.org/stylua.json |
Validate with Lintel
npx @lintel/lintel check
Configuration files for the Stylua formatter
Properties
Specify a disambiguation for the style of Lua syntax being formatted.
Approximate line length for printing. Used as a guide for line wrapping - this is not a hard requirement: lines may fall under or over the limit.
Line endings type.
Indent type.
Character size of single indentation. If indent_type is set to Tabs, this option is used as a heuristic to determine column width only.
Quote style for string literals.
Whether parentheses should be applied on function calls with a single string/table argument.
Specify whether to add a space between the function name and parentheses.
Specify whether to collapse simple statements.
StyLua has built-in support for sorting require statements. We group consecutive require statements into a single "block", and then requires are sorted only within that block. Blocks of requires do not move around the file.
StyLua only considers requires of the form local NAME = require(EXPR), and sorts lexicographically based on NAME. (StyLua can also sort Roblox services of the form local NAME = game:GetService(EXPR))
Requires sorting is off by default.