B_arocena
(B_arocena)
January 1, 2024, 4:05am
1
Introduction
StyLua is a formatter for lua/luau, StyLua-Roblox is a plugin to use StyLua in Roblox Studio.
Features
Compared to roblox’s format document feature, StyLua offers lot of different formatting configuration.
more information about the details of each option can be found here
Installation
Usage
Once installed, you can run the program and use the plugin on Studio, You need to run the program at background while using the plugin.
(program runs at your system tray)
To Format, click the StyLua button or bind a shortcut from shortcut settings.
Formatting with a script editor open will format the current script.
To format multiple scripts, close the script editor and select the scripts you want to format from Explorer and format.
To Change the Configuration of StyLua, Click the Open Settings Button.
These settings are user only and will be used when there is no place-only setting.
To Create Place-only Settings, Add a module named StyLua (case-sensitive) to ServerStorage.
Copy the Settings from Open Settings menu and paste it in, plugin will use these settings.
Place-only settings are useful for keeping the settings consistent for users in the teamcreate.
25 Likes
This is pretty nice, I’m definitely gonna use this
4 Likes
in your examples you do something weird methods to achieve your “long string.”
You can do multiple lines using [[ ]]
for example:
local longString = [[ hello world
I love pizza
Yay]]
print(longString)
All of the other stuff you do is done by roblox automatically when you copy and paste a script. I feel like you wasted your time making this.
2 Likes
I personally dont use studio editor that much but seems like this plugin is gonna improve studio editor experience a lot
3 Likes
B_arocena
(B_arocena)
January 1, 2024, 7:05am
5
The code in the example demonstrates line breaking on concat , not multiline strings.
Studio’s default formatting does not have opiniated features since it is made to be used without any setting.
Also, the examples are using default settings which is suppose to be as default as possible, while giving you option to config as you like.
you might want to check out before giving your “feedback”
4 Likes
I still cant see a purpose. I think it should instead organize the code, convert names to camelCase, and other formatting things roblox doesn’t do automatically.
2 Likes
My god. I’ve been using JohnyMorganz’ stylua (on VSCode). But now on studio? Now this is 2024!
4 Likes
I was wondering if there was a code formatter for Roblox Studio, after a fast google search i found this amazing plugin.
1 Like
@B_arocena , why did downloading the latest version of StyLua-Roblox.exe from your GitHub releases page result in my anti-virus software detecting malware connected to it??
it is probably due to exe being not signed or native calls to hide terminal and put the app to trayicon
if you dont want to download it, feel free to check index.js and build the exe yourself (node build.js)
1 Like
No I don’t mind, but what I can’t understand is the fact the keyword “FileRepMalware” was brought up. If it’s something weird my antivirus is bringing up then yeah, I can understand.
B_arocena
(B_arocena)
July 29, 2025, 4:28am
13
Changelog
Bumped StyLua to 2.1.0
Added space_after_function_names config
space config might not appear on roblox plugin settings page due to cached settings, you can add it manually like this
space_after_function_names = "Always", --| Never, Definitons, Calls, Always |
I’ve been getting this error as of yesterday:
[StyLua] RuntimeError: unreachable
at wasm://wasm/00c7f966:wasm-function[1840]:0x28e211
at wasm://wasm/00c7f966:wasm-function[2020]:0x295df2
at wasm://wasm/00c7f966:wasm-function[2915]:0x2a9731
at wasm://wasm/00c7f966:wasm-function[2916]:0x2a975d
at wasm://wasm/00c7f966:wasm-function[2700]:0x2a6978
at wasm://wasm/00c7f966:wasm-function[2351]:0x29fa75
at wasm://wasm/00c7f966:wasm-function[3113]:0x2aafea
at wasm://wasm/00c7f966:wasm-function[1062]:0x256ddf
at Object.formatCode (C:\snapshot\StyLua-Roblox\node_modules\@johnnymorganz\stylua\stylua_lib.cjs:146:14)
at C:\snapshot\StyLua-Roblox\index.js:41:25
What’s up? I didn’t change anything and I’ve been using this plugin for years. Would appreciate any help. Thanks
B_arocena
(B_arocena)
January 16, 2026, 6:39pm
15
There is an issue on wasm compilation of stylua that I haven’t found the root cause yet, so if this error happens frequently you can downgrade to version 1.2.0
1 Like