StyLua: A Lua code formatter
Posted: Wed Jul 15, 2026 3:44 pm

StyLua is the standard code formatter for Lua and Luau. You stop arguing about style in code reviews, you run one command, and every file in the project looks the same. It supports Roblox specific syntax including types.
What is StyLua?
A Lua code formatter
A deterministic code formatter for Lua 5.1, 5.2, 5.3, 5.4, LuaJIT, Luau and CfxLua/FiveM Lua, built using full-moon. StyLua is inspired by the likes of prettier, it parses your Lua codebase, and prints it back out from scratch, StyLua mainly follows the Roblox Lua Style Guide, with a few deviations. There are multiple ways to install StyLua: Pre-built binaries are available on the GitHub Releases Page. By default, these are built with all syntax variants enabled (Lua 5.2, 5.3, 5.4, LuaJIT and Luau), to cover all possible codebases. See configuring runtime syntax selection if you need to select a particular syntax of Lua to format. Alternatively, see installing from crates.io on how to install a particular flavour of StyLua. If you have Rust installed, you can install StyLua using cargo. By default, this builds for just Lua 5.1. You can pass the --features argument to add extra syntax variants: You can specify multiple features at once, and then use configuration in a .stylua.toml file to defer syntax selection to runtime. The stylua-action GitHub Action can install and run StyLua.
The facts, straight from GitHub
- Repository: JohnnyMorganz/StyLua
- 2,254 stars and 101 forks, with 74 open issues
- Written mainly in Rust
- Licensed under MPL-2.0
- Started in 2020, last updated 2026-07-08
Grab it with: git clone https://github.com/JohnnyMorganz/StyLua.git
You need the Rust toolchain (rustup). Clone the repository and run cargo build --release.
Frequently asked questions
Is StyLua free to use?
It is released under the MPL-2.0 license, so it is free to use. Read the license text for the exact terms before you ship anything based on it.
Is the project still maintained?
Yes, the last update was pushed on 2026-07-08, so the project is alive and moving.
What do I need to know before diving in?
The project is written mainly in Rust, so some familiarity there helps a lot. Start with the README, then browse the open issues to see what the rough edges are. That is usually the fastest way to understand the real state of any repository.
Where do I get help if I am stuck?
Open an issue on the GitHub issue tracker, check existing discussions, and of course post right here in this topic. Someone in the Roblox community has probably hit the same wall before you.
Over to you
Have you tried StyLua? Are you running it, forking it, or did you rage quit halfway through the setup? Reply below with your experience, your questions or your own favorite alternative. If there is enough interest we can put together a community guide for it.