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 repo includes standalone CLI tools for type checking and static analysis — no VS Code required. Use these from scripts, CI pipelines, or AI coding agents. Quick Start
|
| Category | Types |
|---|---|
| Core | Vector, Color, Mat2D |
| Drawing | Path, Paint, Renderer, Gradient, PathMeasure, ContourMeasure, ImageSampler |
| Scene | NodeData, NodeReadData, Artboard, Animation |
| Data Binding | ViewModel, Property<T>, PropertyList, DataContext, Context, Data namespace |
| Assets | Image, Blob, AudioSource, AudioSound, Audio |
| Script Protocols | Node<T>, Layout<T>, Converter<T,I,O>, PathEffect<T>, ListenerAction<T>, TransitionCondition<T> |
| Data Values | DataValue, DataValueNumber, DataValueString, DataValueBoolean, DataValueColor |
| Events | PointerEvent |
| Testing | Tester, Expectation |
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/
│ ├── luau-lsp # Language server binary (macOS)
│ ├── rive-luau-analyze # CLI: static analysis & type checking
│ └── rive-luau-lsp # CLI: start LSP server (stdio)
├── definitions/
│ ├── rive-globals.d.luau # Rive API type definitions (with docs)
│ └── luau-api-docs.json # Standard library documentation
└── 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
Prerequisites
- Node.js 18+
- npm
- VS Code 1.80+
Build the Extension
cd extension
npm install
npx @vscode/vsce package --allow-missing-repository
Build the Language Server (optional)
To rebuild the language server binary from source, clone the modified luau-lsp fork and build with CMake:
git clone https://github.com/ivg-design/luau-lsp.git
cd luau-lsp
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --target luau-lsp -j
Copy the resulting binary to extension/bin/luau-lsp.
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.