{"repo":"JohnnyMorganz/StyLua","free":true,"listed":false,"github":"https://github.com/JohnnyMorganz/StyLua","clone":"git clone https://github.com/JohnnyMorganz/StyLua.git","description":"A Lua code formatter","language":"Rust","stars":2279,"topics":["lua","formatter","pretty-printer","printer","luau","stylua","luaformatter","hacktoberfest"],"license":"MPL-2.0","category":"dev-tools","readme_excerpt":"StyLua 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, enforcing a consistent code style. StyLua mainly follows the Roblox Lua Style Guide, with a few deviations. Installation There are multiple ways to install StyLua: With Github Releases 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. From Crates.io 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. GitHub Actions The stylua-action GitHub Action can install and run StyLua. This action uses the prebuilt GitHub release binaries, instead of running cargo install, for faster CI startup times. pre-commit You can use StyLua with pre-commit. There are 3 possible pre-commit hooks available: - stylua : installs via cargo - requires the Rust toolchain - stylua-system : run","default_branch":null,"files":null,"tree":[],"storefront":"/r/JohnnyMorganz","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/JohnnyMorganz/StyLua/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}