Single addon or gamemode
Open the addon or gamemode folder directly in VS Code. The extension detects the structure from its path (garrysmod/addons/ or garrysmod/gamemodes/).
garrysmod
addons
my-addon <- Workspace Root
lua
addon.json
.gluarc.json
...
gamemodes
my-gamemode <- Workspace Root
gamemode
.gluarc.json
gamemode.txt
...
Multi-root workspaces
If you work on a gamemode and multiple addons, use a multi-root workspace and add each as its own folder. By default, GLuaLS disables multi-root workspace isolation. The language server merges workspace configs into one global baseline. The first workspace config wins scalar conflicts, arrays are unioned, and per-workspace file overrides still apply where needed. You can enable isolation withworkspace.enableIsolation when you want each folder analyzed separately. See Configuration for details.
Do not open the entire
garrysmod/ folder as your workspace root. GLuaLS expects each root to be an individual addon or gamemode, not the entire game directory.Library paths
If your project uses shared utility files outside the workspace root, add them as library paths:.gluarc.json
Ignoring files and folders
.gluarc.json
Custom require patterns
If your project uses a custom module loader, map it torequire behavior:
.gluarc.json
Annotations path
By default, the VS Code extension downloads and updates GMod wiki annotations. If you need a custom annotations build or want to turn off downloads:.gluarc.json
Next steps
Set up the debugger
Move from workspace setup to runtime debugging on SRCDS.
Debugger overview
See what breakpoints, stepping, inspection, and Lua execution can do.
Configuration overview
Tune GLuaLS behavior for your workspace.
Features overview
Browse the main language, debugger, and GMod-specific features.