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
AI-powered service management for IT and enterprise teams Icon
AI-powered service management for IT and enterprise teams

Enterprise-grade ITSM, for every business

Give your IT, operations, and business teams the ability to deliver exceptional services—without the complexity. Maximize operational efficiency with refreshingly simple, AI-powered Freshservice.
Try it Free
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