StyLua

A deterministic, opinionated code formatter for Lua, LuaJIT, Luau and CfxLua.

Open source (MPL-2.0)By JohnnyMorganz

Compare StyLua with another product

2 more ways to get StyLua

Alternatives

See all alternatives

About StyLua

StyLua is a code formatter for Lua in the spirit of Prettier. It parses Lua source and prints it back in a consistent style, so formatting stops being a matter of debate in a codebase.

It supports Lua 5.1 to 5.4, LuaJIT, Luau and CfxLua/FiveM Lua, and is built on the full-moon parser. Besides the command-line tool, the repository includes a VS Code extension, an npm package, a WebAssembly build and pre-commit hooks.

Strengths

  • Covers many Lua dialects including Luau and LuaJIT
  • Deterministic output for consistent diffs
  • VS Code extension, npm package and pre-commit hooks
  • Actively maintained

Limitations

  • Opinionated style with limited room for customization
  • Formats Lua only

Details

Pricing
FreeFree and open source under the Mozilla Public License 2.0.
License
MPL-2.0
Developer
JohnnyMorganz
Platforms
Windows, macOS, Linux, Command line
How it runs
Downloadable app
Account
Not required
Works offline
Yes
Best suited for
Lua and Luau developers who want automatic, consistent formatting
Last verified
Added

Report a wrong fact or a dead link on this listing