GS/BS
← Standards directory
Formatting

StyLua.

Use one Lua formatter across editors

Select the syntax dialect and commit the formatting config. Verify Lua and Luau source with a read-only CI pass.

Lua / Luau

Community rubric · v1

The evidence

Evidence coverage5 / 8
5 supported · 3 unresolved

One point for each verified check. Unknown means we still need evidence. Contrary evidence records an observed result that goes against the criterion.

Latest evidence review ·

  • Definition

    Verified

    StyLua defines deterministic formatting over the supported Lua dialects. Configuration and syntax selection affect the expected output.

    Cited source ↗
  • Measurement

    Verified

    --check compares files with StyLua's formatted result and prints differences.

    Cited source ↗
  • Conformance

    Unknown

    No reviewed evidence is recorded for this dimension.

    What would demonstrate a violation? Contribute evidence ↗

  • CI enforcement

    Verified

    Upstream documents --check for CI: the command exits nonzero when source would be reformatted.

    Cited source ↗
  • Getting started

    Verified

    Install StyLua from a release or package, run the formatter with --check on a Lua file and compare the documented diff and nonzero result on unformatted input.

    Cited source ↗
  • Real-world adoption

    Verified

    Neovim’s repository configures StyLua to use two-space indentation, Unix line endings and a 100-column width.

    Cited source ↗
  • Agent guidance

    Unknown

    No reviewed evidence is recorded for this dimension.

    Can an agent act on a specific finding? Contribute evidence ↗

  • Agent portability

    Unknown

    No reviewed evidence is recorded for this dimension.

    Does the practice work in two agent harnesses? Contribute evidence ↗

Use this standard

Run the check with the tool installed and configured for your project.

stylua --check .

Agent prompt

Use StyLua in this repository to meet this standard: Use one Lua formatter across editors. Select the syntax dialect and commit the formatting config. Verify Lua and Luau source with a read-only CI pass. Inspect the repository configuration, record the baseline and exact reproduction steps, then add the smallest repeatable check that detects a regression.
Read the agent skill ↗

Primary source

StyLua documentation ↗