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

# GLua Language Server: GMod Lua IDE Support

> GLua Language Server adds IntelliSense, realm checks, net message analysis, and a formatter to VS Code for Garry's Mod Lua development.

GLua Language Server is a VS Code extension that turns your editor into a full IDE for Garry's Mod Lua (GLua). It ships with 5,586 API entries from the Garry's Mod wiki, so you get completions, type tracking, and diagnostics without needing an internet connection. The extension also understands GMod's unique runtime concepts, including server/client/shared realms, net message payloads, and hook signatures.

<CardGroup cols={2}>
  <Card title="Installation" icon="download" href="/installation">
    Install from a .vsix package or build from source in minutes.
  </Card>

  <Card title="Quickstart" icon="play" href="/quickstart">
    Take a five-minute tour of completions, realms, and net messages.
  </Card>

  <Card title="Configuration" icon="settings" href="/configuration/overview">
    Tune diagnostics, formatting, and inline suppressions to match your project.
  </Card>

  <Card title="Rules Reference" icon="book-open" href="/reference/rules">
    Browse every diagnostic rule the language server can enforce.
  </Card>
</CardGroup>

## Feature highlights

<AccordionGroup>
  <Accordion title="IntelliSense and type tracking" icon="sparkles">
    The extension resolves types as you type, so completions include the right methods for your variables. It tracks 331 globals, 1,257 library functions, 2,376 class methods, 1,069 panel methods, 100 enums, and 72 structures from the bundled wiki dataset.
  </Accordion>

  <Accordion title="Realm awareness" icon="globe">
    GLua files run on the server, the client, or both. The extension flags code that calls a server-only API inside a client file, or vice versa, so you catch realm mismatches before you test in-game.
  </Accordion>

  <Accordion title="Net message analysis" icon="message-square">
    When you send a net message on the server, the extension checks that the client reads the same payload types in the same order. Mismatched WriteString / ReadUInt pairs are caught early.
  </Accordion>

  <Accordion title="Hook intelligence" icon="zap">
    With 551 hook signatures in the dataset, the extension validates hook names and argument counts. You get completions for hook parameters and warnings for incorrect signatures.
  </Accordion>

  <Accordion title="Formatter" icon="align-left">
    Format GLua with a dedicated formatter that understands GMod conventions. Configure it through `.gluafmtrc.json`, `.editorconfig`, or `.prettierrc`.
  </Accordion>
</AccordionGroup>

## Performance

The extension is built for large codebases. Here are measured results on a 932-file, 232,000-line gamemode:

| Metric                     | Result |
| -------------------------- | ------ |
| Cold index                 | 4.8 s  |
| Retained heap              | 59 MB  |
| Re-analyse 3,200-line file | 31 ms  |
| Member completion          | 1.2 ms |
| Global completion          | 4.1 ms |
| Diagnostics                | 3.5 ms |

## Activation

GLua Language Server does not claim every `.lua` file on your machine. It activates only on Garry's Mod workspaces, or when you explicitly enable it. The status bar shows the current mode:

* `GLua · Server`
* `GLua · Client`
* `GLua · Shared`
* `Plain Lua`

If you see `Plain Lua` in a GMod project, click the status bar item or set `glua.activation` to `always`.


## Related topics

- [GLua Language Server Performance](/reference/performance.md)
- [GLua Language Server Commands](/reference/commands.md)
- [Install GLua Language Server for VS Code](/installation.md)
- [Realm Awareness in GLua Language Server](/features/realms.md)
