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

# Configure GLua

> GLua is configurable through VS Code settings, committed config files, and inline suppressions that all layer in a defined precedence.

Configuration lives in three places: your editor settings for personal preferences, a committed config file for anything the whole team needs to agree on, and inline suppressions for a single line the rule got wrong. Higher layers win when the same option is set in more than one.

<CardGroup cols={3}>
  <Card title="Committed config files" icon="file-code" href="/glua/configuration/config-files">
    Share linter and formatter settings with `.glua.json` and `.gluafmtrc.json`.
  </Card>

  <Card title="Inline suppressions" icon="message-square-x" href="/glua/configuration/suppressions">
    Silence a specific diagnostic on a single line or block without changing global rules.
  </Card>

  <Card title="Diagnostic rules" icon="list" href="/glua/reference/rules">
    Browse every diagnostic rule the linter can enforce or ignore.
  </Card>
</CardGroup>

## Precedence order

Lowest to highest. The last one to set an option wins.

1. Built-in defaults
2. VS Code editor settings (`settings.json`)
3. `.editorconfig`
4. `.prettierrc`
5. `.glua.json` (linter)
6. `.gluafmtrc.json` (formatter)

[Inline suppressions](/glua/configuration/suppressions) sit outside this chain. They do not change a rule's severity; they hide individual findings from a rule that is otherwise still running.

<Note>
  `.editorconfig` and `.prettierrc` are read so a project that already has them does not repeat itself. Where they disagree with `.glua.json` or `.gluafmtrc.json`, the GLua-specific file wins.
</Note>

## The `glua.activation` setting

`glua.activation` decides when the language server attaches to `.lua` files. The default is to attach only in workspaces that look like Garry's Mod.

| Value    | Behavior                                                                        |
| -------- | ------------------------------------------------------------------------------- |
| `auto`   | Takes over `.lua` files only in workspaces that look like Garry's Mod (default) |
| `always` | Takes over every `.lua` file                                                    |
| `never`  | Never takes over `.lua` files; only `.glua` files are handled                   |

The status bar shows the current realm — `GLua · Server`, `GLua · Client`, `GLua · Shared`, or `Plain Lua` — while the server is attached. Click it, or use the Command Palette, to override when the auto-detection guessed wrong.
