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.
Required tools
Section titled “Required tools”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:
rokit --versionpesde 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:
pesde --versionLune is a Luau runtime required by pesde to execute CLI scripts such as pesde x. Install it via Rokit:
rokit add lune-org/lune@0.10.4Verify it is available:
lune --versionZune is a Luau runtime used to run the create_app wizard and, by default, your bot itself. Install it via Rokit:
rokit add Scythe-Technology/zune@0.5.5Verify it is available:
zune --versionIDE setup
Section titled “IDE setup”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.
Visual Studio Code
Section titled “Visual Studio Code”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.
Neovim
Section titled “Neovim”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.
Optional tools
Section titled “Optional tools”Selene
Section titled “Selene”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:
rokit add Kampfkarren/seleneGit 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.