Custom Globals
By default, Luau is strict about global variables. If you need to use globals (custom ones or from libraries not covered by standard types), you must declare them.
The default globals.d.luau file is located at ~/.kaledis/globals.d.luau
globals.d.luau
Section titled “globals.d.luau”Usually your editor looks for a file named globals.d.luau in your project root. Use this file to define types for your globals.
-- globals.d.luau
declare global MyGlobalConfig: { debugMode: boolean, version: string}
declare function customPrint(message: string): voidLove2D Globals
Section titled “Love2D Globals”Standard Love2D globals (like love) are automatically handled if you have the correct types installed or if you use the modules configuration in kaledis.toml.
Common Issues
Section titled “Common Issues”- “Unknown global” error: This usually means the global hasn’t been defined in a
.d.luaufile or the file is not being picked up by the Luau analyzer. Restarting the LSP (VS Code) often fixes this. If that did not work, look in the logs of your lsp for errors.