// plugins
StyLua Plugin
Wrapper plugin that formats Lua and Luau code via StyLua. It runs StyLua's own code compiled to Wasm, so it formats exactly like the StyLua CLI.
Formats .lua and .luau files. Lua 5.1 through 5.4, Luau, LuaJIT, and CfxLua are supported.
Install and Setup
In your project's directory with a dprint.json file, run:
dprint add stylua
This will update your config file to have an entry for the plugin. Then optionally specify a "stylua" property to add configuration:
{
"stylua": {
// StyLua's config goes here
},
"plugins": [
"npm:@dprint/stylua@x.x.x"
]
}
Configuration
See Configuration.