An opinionated code formatter for Lua 5.1, 5.2, 5.3, 5.4 and Luau, built using full-moon. StyLua is inspired by the likes of prettier, it parses your Lua codebase, and prints it back out from scratch, enforcing a consistent code style. By default, these are built with all syntax variants enabled (Lua 5.2, 5.3, 5.4 and Luau), to cover all possible codebases. If you would like to format a specific Lua version only, see installing from crates.io. You can use the stylua-action GitHub Action in your CI to install and run StyLua. This action uses the prebuilt GitHub release binaries, instead of running cargo install, for faster CI times. This command will format the foo.lua and bar.lua file, and search down the src directory to format any files within it. StyLua can also read from stdin, by using - as the file name.

Features

  • There are multiple ways to install StyLua
  • You can use the stylua-action GitHub Action in your CI to install and run StyLua
  • You can use StyLua with pre-commit
  • StyLua is available on the Docker Hub
  • StyLua is available on macOS via the Homebrew package manager
  • Editor Integrations

Project Samples

Project Activity

See All Activity >

Categories

Code Formatters

License

Mozilla Public License 1.0 (MPL)

Follow StyLua

StyLua Web Site

Other Useful Business Software
Paessler - Monitor Your Whole Network in Minutes Icon
Paessler - Monitor Your Whole Network in Minutes

Auto-discovery finds your devices and deploys pre-configured sensors instantly. No project plan required, just visibility from day one.

Waiting weeks for a monitoring rollout isn't an option when infrastructure doesn't stop running. PRTG's auto-discovery scans your network and suggests from over 200 pre-configured sensor types, so you're watching servers, applications and devices within minutes, not after a multi-week deployment. Enterprise-strength monitoring, without the enterprise complexity. Start your free trial today.
Start Free 30-Day Trial
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of StyLua!

Additional Project Details

Operating Systems

Linux, Windows

Programming Language

Rust

Related Categories

Rust Code Formatters

Registered

2023-04-25