Overview
Theworkspace section tells the language server which files to analyze, which files to ignore, and where to find external libraries. It also controls module resolution and file encoding.
Options
Library paths
workspace.library adds directories to analysis without treating them as project source. Use this for annotation files, dependencies, or other code you need to reference from your project.
This helps gamemodes such as Helix, where your schema needs to reference the “core” Helix gamemode. Add
../helix as a library path in your schema gamemode..gluarc.json
Ignore patterns
Exclude directories or files from analysis:.gluarc.json
garrysmod(Steam engine files)addons(other addons’ source, if not relevant to your project).gitout,build,dist
Ignore default overrides
workspace.ignoreDirDefaults lets you override, disable, or extend the built-in ignore defaults without replacing the whole list.
The list accepts two forms:
- Strings replace the built-in list with your own patterns.
- Objects change, remove, or add individual entries while keeping the rest of the built-in list.
Object entry fields:
Disable a single built-in:
.gluarc.json
.gluarc.json
.gluarc.json
moduleMap rewrites require paths to file paths using regex replacement. Use it when your project uses non-standard require patterns.
.gluarc.json
Workspace roots
If your Lua files are not at the repository root, specify the Lua root:.gluarc.json
require("mymodule") relative to lua/mymodule.lua.
File encoding
Most Lua files use UTF-8, but older addons may use a legacy encoding:.gluarc.json
"utf-8", "utf-16", "gbk", "latin1", "ascii".
VS Code extension settings
You can also configure these settings in VS Code settings with thegluals.* prefix: