diff --git a/docs/config-luauconfig.md b/docs/config-luauconfig.md index dd90e4a9..8aa21fa1 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 b321b94b..70fffe0c 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" } ```