Overview
GLuaLS ships without bundled GMod API definitions. The VS Code extension downloads the latest annotations generated from the Garry’s Mod wiki, so your API definitions stay current without extension updates.How it works
On first launch and on later checks, the extension:- Checks the remote metadata for the gluals-annotations branch
- If the annotations are outdated or missing, downloads and extracts the latest ZIP
- Points the language server at the annotations path
Annotation source
By default, the extension downloads annotations fromPollux12/annotations-gmod-glua-ls on the gluals-annotations branch. You can point downloads at another compatible GitHub repository or branch from VS Code settings:
| VSCode Setting | Default | Description |
|---|---|---|
gluals.gmod.annotationsRepository | Pollux12/annotations-gmod-glua-ls | GitHub repository in owner/repository format, or a GitHub repository URL |
gluals.gmod.annotationsBranch | gluals-annotations | Branch containing generated annotations and __metadata.json; plugin artifact branches are not supported |
VS Code settings
Manual update
To force an annotations update:- Open the Command Palette (
Ctrl+Shift+P) - Run GLua: Update Annotations
Disabling auto-download
If you need to use a custom annotations build or are in an environment without internet access:| VSCode Setting | .gluarc.json Key | Default | Description |
|---|---|---|---|
gluals.gmod.autoLoadAnnotations | gmod.autoLoadAnnotations | true (null in workspace) | Auto-download and load GMod wiki annotations |
Via VSCode settings
VS Code settings
Via .gluarc.json (per-workspace)
.gluarc.json
Using a custom annotations path
Point GLuaLS at your own annotations folder instead of the auto-downloaded ones:| .gluarc.json Key | Type | Default | Description |
|---|---|---|---|
gmod.annotationsPath | string | null | null | Path to custom annotations folder |
.gluarc.json
annotationsPath, GLuaLS does not use the downloaded annotations for that workspace.
gmod.annotationsPath takes precedence over the extension’s auto-download setting for that workspace. Set gmod.autoLoadAnnotations: false in .gluarc.json to disable auto-loading for that workspace, including extension settings and CLI-provided annotation paths.What the annotations contain
The annotations are generated from the official Garry’s Mod wiki and include:- All GMod global functions with parameter types, return types, and descriptions
- All class methods (Entity, Player, Weapon, etc.)
- All enumerations
- All hooks with parameter types
- Realm badges indicating where each function is available