Skip to content

Environment Setup

This guide walks through installing the tools required to develop a discord-luau application. Complete this before moving on to the Installation page.

Rokit is a toolchain manager used to install and manage Luau runtimes. Install it by following the instructions in the Rokit repository.

Once installed, verify it is available:

Terminal window
rokit --version

pesde is the Luau package manager used to install discord-luau and to run the project scaffolder. Follow the installation instructions at pesde.dev.

Verify the installation:

Terminal window
pesde --version

Lune is a Luau runtime required by pesde to execute CLI scripts such as pesde x. Install it via Rokit:

Terminal window
rokit add lune-org/lune@0.10.4

Verify it is available:

Terminal window
lune --version

Zune is a Luau runtime used to run the create_app wizard and, by default, your bot itself. Install it via Rokit:

Terminal window
rokit add Scythe-Technology/zune@0.5.5

Verify it is available:

Terminal window
zune --version

discord-luau projects are configured to work with Luau LSP, which provides autocomplete, type checking, and inlay hints. The create_app scaffolder automatically generates IDE settings for your chosen editor.

Install the Luau LSP extension from the VSCode Marketplace or the OpenVSX Registry.

When you scaffold a project with VSCode selected, create_app generates the following .vscode/settings.json:

{
"editor.formatOnSave": true,
"luau-lsp.inlayHints.variableTypes": true,
"luau-lsp.inlayHints.functionReturnTypes": true,
"luau-lsp.inlayHints.parameterNames": "all",
"luau-lsp.inlayHints.parameterTypes": true,
"luau-lsp.inlayHints.typeHintMaxLength": 50,
"luau-lsp.fflags.override": {
"LuauTarjanChildLimit": "0",
"LuauTypeInferIterationLimit": "0"
}
}

Install the Luau LSP extension from the Zed extension marketplace.

When you scaffold a project with Zed selected, create_app generates a .zed/settings.json that configures Luau LSP with the same inlay hints and flag overrides as the VSCode config above.

Install Luau LSP and configure it via your Neovim LSP setup. The create_app scaffolder does not generate Neovim-specific config files, so LSP configuration is left to your existing Neovim setup.

Selene is a Luau linter. create_app generates a selene.toml for every project with the following config:

std = "luau"
[lints]
high_cyclomatic_complexity = "allow"
if_same_then_else = "allow"
shadowing = "allow"

To use it, install Selene via Rokit:

Terminal window
rokit add Kampfkarren/selene

Git is recommended for version control. create_app can initialise a repository for you during scaffolding, and generates .gitignore and .gitattributes files.

The .gitignore excludes .env.luau (your bot token) and luau_packages/ (installed dependencies).

Install Git by following the official guide.