Documentation Index
Fetch the complete documentation index at: https://mintlify.com/rojo-rbx/rojo/llms.txt
Use this file to discover all available pages before exploring further.
rojo sourcemap reads your project and outputs a JSON tree that maps each Roblox instance in the project to the filesystem paths that produced it. Language tools like luau-lsp consume this file to provide accurate go-to-definition, type inference, and diagnostics for your scripts.
Synopsis
Arguments and flags
Path to the project file or to a directory containing a
default.project.json. Defaults to the current directory.Path to write the sourcemap JSON file. When omitted, the sourcemap is printed to stdout.
Include non-script instances (e.g.
Part, Folder) in the sourcemap. By default only Script, LocalScript, and ModuleScript instances are emitted, keeping the file compact for language tools that only care about scripts.Automatically regenerate the sourcemap when any source file changes. The sourcemap is only re-written when a change affects the sourcemap output.
Use absolute filesystem paths instead of paths relative to the project directory. Some tools require absolute paths.
Global flags
Increase log verbosity. Pass multiple times (e.g.
-vv) for more detail.Control color output. Accepted values are
auto, always, and never.Sourcemap format
The output is a JSON object tree mirroring the Roblox instance hierarchy. Each node has the following shape:filePaths lists every filesystem path that contributed to an instance. For a .lua file this is the script itself; for a directory-based instance it is the folder.
Using with luau-lsp
Generate a sourcemap file and point luau-lsp at it using its--sourcemap flag:
