One addon or gamemode
Open the addon or gamemode folder directly in VS Code:garrysmod
addons
my-addon ← open this
lua
addon.json
gamemodes
my-gamemode ← or this
gamemode
my-gamemode.txt
Several addons or a gamemode with addons
Use a multi-root workspace and add each addon or gamemode as its own folder (File → Add Folder to Workspace). GLuaLS analyzes all folders together, so code in one folder can use functions and classes from another.Gamemodes based on another gamemode
If your gamemode’s.txt file sets a base, GLuaLS loads that base gamemode automatically when it can find it next to yours. For example, a Helix schema finds the helix gamemode in the same gamemodes/ folder. base and sandbox are always available.
If the base gamemode lives somewhere else, add it as a library (see below).
Code from outside your project
If your code uses an addon or library that is not open in VS Code, add its folder toworkspace.library in .gluarc.json. GLuaLS reads its functions and types, but does not show warnings for it.
.gluarc.json
Skip files
GLuaLS already skips folders such as.git, node_modules and the folders GLuaTest loads tests from (lua/tests and gamemode/tests). To skip more, right-click a folder in the Explorer and choose Add Directory to Ignore List, or edit .gluarc.json:
.gluarc.json