Rive Luau LSP
A VS Code language server for Rive's Luau scripting environment. Features
Documentation PhilosophyEvery tooltip is written for people who do not code for a living. The Rive Luau scripting audience is primarily artists and motion designers learning to script. Tooltips explain concepts in visual/conceptual terms, use analogies, show practical examples with context, and warn about common mistakes in plain language. Examples:
CLI Usage (for agents and automation)The supported default install is a prebuilt CLI archive from the GitHub Releases page. Choose the matching Release builds provide CLI archives for Windows x64 ( Release archive quick startOn macOS or Linux:
On Windows, run the binary directly from PowerShell. The extensionless wrappers can also be used from Git Bash.
Build a source checkout before using itA fresh checkout contains source and shell wrappers, but no usable language-server binary. Initialize Luau, apply the tracked Rive patch, and build before running the repository paths:
From another working directory, invoke either source wrapper by absolute path. Each wrapper resolves its binary, definitions, and documentation from its own checkout location rather than from the caller's current directory. The analyzer accepts one or more files or directories and passes analyzer options to
Direct language-server commandThe
AI Agent SkillsReady-to-install skill packages for AI coding agents. Each skill gives the agent access to the Rive Luau type checker, API reference, script patterns, and a validation workflow. Claude CodeInstall by copying into your personal or project skills directory:
Then invoke with See OpenAI CodexInstall by copying into your user or project skills directory:
Codex will auto-trigger the skill when working with Rive Luau scripts. You can also invoke it explicitly as See Other LSP-Compatible Editors (Cursor, Windsurf, Neovim, etc.)Point your editor's LSP configuration to the language server:
VS Code ExtensionFrom VSIX (recommended)
From Source
On Windows, copy What's IncludedLanguage Server (
|
| Category | Types |
|---|---|
| Core | Vector, Color, Mat2D, Mat4, Promise, runtime buffer half-float/stride/conversion helpers |
| Drawing | Path, PathCommand, PathData, Paint, Renderer, Gradient, PathMeasure, ContourMeasure, ImageSampler, Canvas, GPUCanvas |
| GPU Shaders | Shader, GPUBuffer, GPUTexture, GPUTextureView, GPUSampler, GPUPipeline, GPUBindGroupLayout, GPUBindGroup, GPURenderPass |
| Scene | NodeData, NodeReadData, Artboard<T>, Animation |
| Data Binding | ViewModel, Property<T>, PropertyImage, PropertyList, DataContext, Context, Data namespace |
| Assets | Image, Blob, Font, AudioSource, AudioSound, Audio |
| Script Protocols | Node<T>, Layout<T>, Converter<T,I,O>, PathEffect<T>, ListenerAction<T>, TransitionCondition<T>, Interpolator<T>, FileFormat, TextFileFormat |
| Data Values | DataValue, DataValueNumber, DataValueString, DataValueBoolean, DataValueColor |
| Events | PointerEvent, KeyboardEvent, TextInput, FocusEvent, ReportedEvent, ViewModelChange, NoneEvent, GamepadConnected, GamepadEvent, GamepadDisconnected, ListenerContext |
| File-format support | FormatDocument, FormatView, FormatSurface, scopes, tokens, diagnostics, completions, hover, editor theme/scroll/context callbacks |
| Testing | Tests, Tester, Expect, Expectation |
Rive Script Modules are ordinary Luau modules loaded with require("name").
The standard-platform resolver walks ancestor directories for bare module paths,
matching Rive workspace behavior. Host-generated or serialized asset identifiers
belong to file metadata; they are not source-level module names or LSP symbols.
EditorContext rollout errata
Rive's public EditorContext documentation currently lists shader(name), canvas(...), gpuCanvas(...), features(), and decodeImage(data). Rive Luau LSP 1.2.1 intentionally does not declare those five methods for file-format views because target-Editor or shipped-source verification has not yet established them as callable there. Their presence on runtime Context is separate evidence and does not establish Editor availability. Until that verification exists, use only the EditorContext members present in definitions/rive-globals.d.luau.
Standard Library Documentation (definitions/luau-api-docs.json)
655 symbol entries covering the entire Luau standard library, all rewritten with educational descriptions:
- math — 30 functions + 7 constants (floor, ceil, clamp, lerp, sin, cos, noise, etc.)
- string — 17 functions (find, format, gsub, split, sub, etc.)
- table — 17 functions (insert, remove, sort, find, move, freeze, etc.)
- bit32 — 15 functions (band, bor, bxor, lshift, rshift, etc.)
- Global functions — print, require, type, tostring, tonumber, assert, error, pcall, xpcall, pairs, ipairs, select, unpack, and more
- coroutine, debug, os, utf8, buffer — full coverage
File Icon
The extension includes a custom icon for .luau files that appears automatically in the VS Code explorer (when your icon theme doesn't define its own .luau icon).
For a dedicated icon theme, open the Command Palette and select "Preferences: File Icon Theme" → "Rive Luau Icons".
Configuration
| Setting | Default | Description |
|---|---|---|
rive-luau.trace.server |
"off" |
Traces communication between VS Code and the language server. Set to "messages" or "verbose" for debugging. |
Project Structure
rive-luau-lsp/
├── README.md
├── CHANGELOG.md
├── LICENSE # MIT
├── ATTRIBUTION.md # Credits to upstream projects
├── bin/
│ └── rive/
│ ├── luau-lsp # Language server binary (macOS)
│ ├── rive-luau-analyze # CLI: static analysis & type checking
│ └── rive-luau-lsp # CLI: start LSP server (stdio)
└── extension/ # VS Code extension source
├── package.json # Extension manifest
├── extension.js # Extension entry point
├── icon.png # Extension marketplace icon
├── README.md # Marketplace page content
├── language-configuration.json
├── bin/
│ └── luau-lsp # Language server binary (bundled)
├── definitions/
│ ├── rive-globals.d.luau # Rive API type definitions (bundled)
│ └── luau-api-docs.json # Standard library docs (bundled)
├── icons/
│ ├── luau.svg # File icon for .luau files
│ ├── file-icon-theme.json # Icon theme definition
│ └── ... # Generic fallback icons
└── syntaxes/
├── Luau.tmLanguage.json # Syntax highlighting grammar
└── codeblock.json # Markdown code block injection
Building from Source
A source checkout must build the native language-server binary before the CLI wrappers or extension can run.
Prerequisites
- CMake and a C++20 compiler
- Node.js 20 and npm for VSIX packaging
- VS Code 1.82+ for local extension installation
Build and test the language server
git clone https://github.com/ivg-design/rive-luau-lsp.git
cd rive-luau-lsp
git submodule update --init luau
git -C luau apply ../patches/luau-rive-mods.patch
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --target Luau.LanguageServer.CLI Luau.LanguageServer.Test -j 4
./build/Luau.LanguageServer.Test
The repository wrappers automatically fall back to build/luau-lsp after that build.
Package a local VSIX
Copy the native binary for the host platform into the extension before packaging it:
mkdir -p extension/bin
cp build/luau-lsp extension/bin/luau-lsp
chmod 755 extension/bin/luau-lsp
npm ci --prefix extension
cd extension
npx @vscode/vsce package
On Windows, copy build/Release/luau-lsp.exe to extension/bin/luau-lsp.exe instead.
Attribution
This project stands on the shoulders of open source software:
- Rive — Copyright (c) 2020 Rive. The scripting API and type definitions are based on Rive's official documentation and runtime (MIT License)
- luau-lsp — Copyright (c) 2022 JohnnyMorganz. The language server that powers everything (MIT License)
- Luau — Copyright (c) 2019-2025 Roblox Corporation; Copyright (c) 1994-2019 Lua.org, PUC-Rio. The scripting language itself (MIT License)
- Lua — Copyright (c) 1994-2019 Lua.org, PUC-Rio. The language Luau is derived from (MIT License)
See ATTRIBUTION.md for full details.