Skip to content

Editor setup

Types and completion in VS Code.

On the Scripts page, click Write definitions. Nyx writes nyx.d.luau and .luaurc next to your scripts.

Install the Luau Language Server extension (JohnnyMorganz.luau-lsp), version 1.70.1 or newer. Older versions can't read nyx.d.luau.

Click Open folder on the Scripts page and open that folder in VS Code. Then add .vscode/settings.json:

{
"files.associations": { "*.lua": "luau" },
"luau-lsp.platform.type": "standard",
"luau-lsp.types.definitionFiles": { "@nyx": "nyx.d.luau" }
}

You now get completion and type errors for the Nyx API.

Turn on Reload on save for the script you're working on. Every save reloads it in the game.