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
Type: object

Configuration files for the Stylua formatter

Properties

syntax string

Specify a disambiguation for the style of Lua syntax being formatted.

Default: "All"
Values: "All" "Lua51" "Lua52" "Lua53" "Lua54" "LuaJIT" "Luau" "CfxLua"
column_width integer

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.

Default: 120
line_endings string

Line endings type.

Default: "Unix"
Values: "Unix" "Windows"
indent_type string

Indent type.

Default: "Tabs"
Values: "Tabs" "Spaces"
indent_width integer

Character size of single indentation. If indent_type is set to Tabs, this option is used as a heuristic to determine column width only.

Default: 4
quote_style string

Quote style for string literals.

Default: "AutoPreferDouble"
Values: "AutoPreferDouble" "AutoPreferSingle" "ForceDouble" "ForceSingle"
call_parentheses string

Whether parentheses should be applied on function calls with a single string/table argument.

Default: "Always"
Values: "Always" "NoSingleString" "NoSingleTable" "None" "Input"
space_after_function_names string

Specify whether to add a space between the function name and parentheses.

Default: "Never"
Values: "Never" "Definitions" "Calls" "Always"
collapse_simple_statement string

Specify whether to collapse simple statements.

Default: "Never"
Values: "Never" "FunctionOnly" "ConditionalOnly" "Always"
sort_requires object

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.

1 nested properties
enabled boolean
Default: false