luau.md

 1---
 2title: Luau
 3description: "Configure Luau language support in Zed, including language servers, formatting, and debugging."
 4---
 5
 6# Luau
 7
 8[Luau](https://luau.org/) is a fast, small, safe, gradually typed, embeddable scripting language derived from Lua. Luau was developed by Roblox and is available under the MIT license.
 9
10Luau language support in Zed is provided by the community-maintained [Luau extension](https://github.com/4teapo/zed-luau).
11Report issues to: [https://github.com/4teapo/zed-luau/issues](https://github.com/4teapo/zed-luau/issues)
12
13- Tree-sitter: [4teapo/tree-sitter-luau](https://github.com/4teapo/tree-sitter-luau)
14- Language Server: [JohnnyMorganz/luau-lsp](https://github.com/JohnnyMorganz/luau-lsp)
15
16## Configuration
17
18Configuration instructions are available in the [Luau Zed Extension README](https://github.com/4teapo/zed-luau).
19
20## Formatting
21
22To support automatically formatting your code, you can use [JohnnyMorganz/StyLua](https://github.com/JohnnyMorganz/StyLua), a Lua code formatter.
23
24Install with:
25
26```sh
27# macOS via Homebrew
28brew install stylua
29# Or via Cargo
30cargo install stylua --features lua52,lua53,lua54,luau
31```
32
33Configure formatting in Settings ({#kb zed::OpenSettings}) under Languages > Luau, or add to your settings file:
34
35```json [settings]
36  "languages": {
37    "Luau": {
38      "formatter": {
39        "external": {
40          "command": "stylua",
41          "arguments": ["-"]
42        }
43      }
44    }
45  }
46```