> ## Documentation Index
> Fetch the complete documentation index at: https://gluals.arnux.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Workspace setup

> Configure your workspace for addon and gamemode development with multi-root workspace support.

## Single addon or gamemode <a id="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/`).

<Tree>
  <Tree.Folder name="garrysmod" openable="false" defaultOpen>
    <Tree.Folder name="addons" openable="false" defaultOpen>
      <Tree.Folder name="my-addon <- Workspace Root" defaultOpen>
        <Tree.File name="lua" />

        <Tree.File name="addon.json" />

        <Tree.File name=".gluarc.json" />

        <Tree.File name="..." />
      </Tree.Folder>
    </Tree.Folder>

    <Tree.Folder name="gamemodes" openable="false" defaultOpen>
      <Tree.Folder name="my-gamemode <- Workspace Root" defaultOpen>
        <Tree.File name="gamemode" />

        <Tree.File name=".gluarc.json" />

        <Tree.File name="gamemode.txt" />

        <Tree.File name="..." />
      </Tree.Folder>
    </Tree.Folder>
  </Tree.Folder>
</Tree>

***

## Multi-root workspaces <a id="multi-root-workspaces" />

If you work on a gamemode and multiple addons, use a [multi-root workspace](https://code.visualstudio.com/docs/editing/workspaces/multi-root-workspaces) and add each as its own folder.

By default, GLuaLS analyzes all workspace folders together so your addons and gamemode can refer to one another. Enable `workspace.enableIsolation` only when you want each folder analyzed separately. See [workspace configuration](/configuration/workspace) for details.

<Note>
  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.
</Note>

***

## Library paths <a id="library-paths" />

If your project uses shared utility files outside the workspace root, add them as library paths:

<Tip>
  Use the settings menu instead of editing the JSON file directly. This helps you avoid config mistakes.
</Tip>

```json .gluarc.json theme={null}
{
  "workspace": {
    "library": [
      "/path/to/shared-utils",
      {
        "path": "./external/mylibrary",
        "ignoreDir": ["tests"],
        "ignoreGlobs": ["**/*.spec.lua"]
      }
    ]
  }
}
```

GLuaLS analyzes library files and makes their types available in your workspace. It does not report diagnostics for library files.

***

## Ignoring files and folders <a id="ignoring-files-and-folders" />

Ignore generated, vendored, or test files that should not affect editor results:

<Tip>
  Use the settings menu instead of editing the JSON file directly. This helps you avoid config mistakes.
</Tip>

```json .gluarc.json theme={null}
{
  "workspace": {
    "ignoreDir": ["build", "dist", ".git"],
    "ignoreGlobs": ["**/*.min.lua", "tests/**"]
  }
}
```

***

## Custom require patterns <a id="custom-require-patterns" />

If your project uses a custom module loader, map it to `require` behavior:

<Tip>
  Use the settings menu instead of editing the JSON file directly. This helps you avoid config mistakes.
</Tip>

```json .gluarc.json theme={null}
{
  "runtime": {
    "requireLikeFunction": ["include", "MYADDON.Require"],
    "requirePattern": ["?.lua", "?/init.lua"]
  }
}
```

***

## Annotations path <a id="annotations-path" />

By default, the VS Code extension downloads and updates Garry's Mod wiki annotations. If you need a custom annotations build or want to turn off downloads:

<Tip>
  Use the settings menu instead of editing the JSON file directly. This helps you avoid config mistakes.
</Tip>

```json .gluarc.json theme={null}
{
  "gmod": {
    "annotationsPath": "./my-custom-annotations",
    "autoLoadAnnotations": false
  }
}
```

See [Annotations management](/configuration/annotations-management) for details on annotation downloads.

***

## Next steps

<CardGroup cols={2}>
  <Card title="Set up the debugger" icon="bug" href="/debugger/setup">
    Move from workspace setup to runtime debugging on SRCDS.
  </Card>

  <Card title="Debugger overview" icon="list-tree" href="/debugger/overview">
    See what breakpoints, stepping, inspection, and Lua execution can do.
  </Card>

  <Card title="Configuration overview" icon="sliders" href="/configuration/overview">
    Tune GLuaLS behavior for your workspace.
  </Card>

  <Card title="Features overview" icon="sparkles" href="/features/overview">
    Browse the main language, debugger, realm, networking, and VGUI features.
  </Card>
</CardGroup>
