Right now, DevForum users must use ```lua to highlight their Roblox code. But, certain syntax highlights in Luau are not available in Lua. After all, Luau, not Lua, is the language of us Roblox developers. Whether it be displaying a resource, asking for help, or giving code fixes, I think forum users would benefit from reading code blocks with Luau-specific syntax highlighting.
Here’s some code with Roblox Studio’s highlighting:
What we currently have with ```lua:
--!strict
type accessory = { name: string }
type drink = accessory & { color: Color3? }
type toy = accessory & { size: number?, material: string?, rarity: number? }
type chocolate = accessory & { flavor: string? }
type contestant = { drink: drink?, toy: toy?, chocolate: chocolate? }
local function round_1_requirements_check(contestant: contestant): boolean
-- realistic contest requirements to be implemented lol
return math.random() < 0.5
end
local contestants: { contestant } = {}
for i = 1, math.random(10, 80) do
local contestant: contestant = {}
-- realistic contestant generation to be implemented
table.insert(contestants, contestant)
end
local round_1_performative: { contestant } = {}
for _, contestant in contestants do
if not round_1_requirements_check(contestant) then
continue
end
table.insert(round_1_performative, contestant)
end
The same block with ```luau:
![]()
--!strict
type accessory = { name: string }
type drink = accessory & { color: Color3? }
type toy = accessory & { size: number?, material: string?, rarity: number? }
type chocolate = accessory & { flavor: string? }
type contestant = { drink: drink?, toy: toy?, chocolate: chocolate? }
local function round_1_requirements_check(contestant: contestant): boolean
-- realistic contest requirements to be implemented lol
return math.random() < 0.5
end
local contestants: { contestant } = {}
for i = 1, math.random(10, 80) do
local contestant: contestant = {}
-- realistic contestant generation to be implemented
table.insert(contestants, contestant)
end
local round_1_performative: { contestant } = {}
for _, contestant in contestants do
if not round_1_requirements_check(contestant) then
continue
end
table.insert(round_1_performative, contestant)
end
Notice the differences? Syntax highlighting for Luau has been implemented for highlightjs, which is used by Discourse.
I believe this would be a nice low-priority QoL feature for the forum that doesn’t seem too hard to implement.

