From 0f673679b3cf4ab2febb7555b41cf5cc350dfda9 Mon Sep 17 00:00:00 2001 From: tapple Date: Tue, 5 May 2026 16:33:23 -0700 Subject: [PATCH 1/2] add `globaldefinitions` to .config.luau --- docs/config-luauconfig.md | 2 ++ docs/config-luaurc.md | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/config-luauconfig.md b/docs/config-luauconfig.md index dd90e4a9c..8aa21fa1a 100644 --- a/docs/config-luauconfig.md +++ b/docs/config-luauconfig.md @@ -32,6 +32,7 @@ return { linterrors = true, typeerrors = true, globals = {"expect"}, + globaldefinitions = "./embed.d.luau", aliases = { src = "./src" } @@ -81,6 +82,7 @@ type LuauConfig = { linterrors: boolean?, typeerrors: boolean?, globals: { string }?, + globaldefinitions: string?, aliases: { [string]: string }?, } diff --git a/docs/config-luaurc.md b/docs/config-luaurc.md index b321b94b3..77ead3ae8 100644 --- a/docs/config-luaurc.md +++ b/docs/config-luaurc.md @@ -26,6 +26,7 @@ applied. When multiple files are used, the file closer to the .lua file override - `"lintErrors"`: a boolean that controls whether lint issues are reported as errors or warnings (off by default) - `"typeErrors"`: a boolean that controls whether type issues are reported as errors or warnings (on by default) - `"globals"`: extra global values; points to an array of strings where each string names a global that the type checker and linter must assume is valid and of type `any` +- `"globalDefinitions"`: string path to a local filename. This is a file in the same luau-like language embedded inside `Analysis/src/EmbeddedBuiltinDefinitions.cpp`, and provides additional global definitions to the typechecker and linter. Example of a valid .luaurc file: @@ -34,7 +35,8 @@ Example of a valid .luaurc file: "languageMode": "nonstrict", "lint": { "*": true, "LocalUnused": false }, "lintErrors": true, - "globals": ["expect"] // TestEZ + "globals": ["expect"], // TestEZ + "globalDefinitions" = "./embed.d.luau", } ``` From 9660b5a6ef7566d64cfc12dae6d0e7bb9a005b37 Mon Sep 17 00:00:00 2001 From: tapple Date: Tue, 5 May 2026 16:42:14 -0700 Subject: [PATCH 2/2] trailing comma --- docs/config-luaurc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/config-luaurc.md b/docs/config-luaurc.md index 77ead3ae8..70fffe0c7 100644 --- a/docs/config-luaurc.md +++ b/docs/config-luaurc.md @@ -36,7 +36,7 @@ Example of a valid .luaurc file: "lint": { "*": true, "LocalUnused": false }, "lintErrors": true, "globals": ["expect"], // TestEZ - "globalDefinitions" = "./embed.d.luau", + "globalDefinitions" = "./embed.d.luau" } ```