linguist
linguist copied to clipboard
Add Language: Luau
Language name
"Luau" https://luau-lang.org
URL of syntax highlighting grammar
https://luau-lang.org/syntax
Most popular extensions
.luau
Should be able to use a slightly modified version of https://github.com/NightrainsRbx/RobloxLsp/blob/master/syntaxes/lua.tmLanguage.json for the grammar. The question is whether to use it slightly modified (removing Roblox globals to better match the outside-Roblox usage) or to keep them, considering usage on Roblox is more common.
I’d like to keep pushing for this—Luau’s interpolated string feature has a tendency to break syntax highlighting:
local function verifyAcyclic(tree: Configuration, node: INode, _visited: { [INode]: true }?)
local visited: { [INode]: true } = _visited or {}
if visited[node] then
error(`!! FATAL: BehaviorTree @ {tree:GetFullName()} isn't acyclic!`)
end
visited[node] = true
if not node.Children then
return
end
for i, child in node.Children do
verifyAcyclic(tree, child, visited)
end
end
Luau is effectively a superset of Lua, so people have been using *.lua
to retain Lua’s subset of syntax highlighting. This makes usage of Luau difficult to track, as it comes down more to patterns that match the extended syntax. There have been pushes to use *.luau
explicitly, but adoption has been slow because it isn’t defined presently.
Bump! Very much needed as Luau grows with Roblox and Roblox is expanding rapidly! I think Luau has consolidated it's place as a language that's here to stay for a while. 😁
Bumming won’t make it happen any faster… we need someone in the community to actually put the work in and submit a PR 😁