> ## 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.

# Configuration overview

> Configure GLuaLS with the settings panel or a .gluarc.json file.

## Overview

Configure language server behavior in a `.gluarc.json` file at your workspace root. The file has full JSON schema support, so your editor validates settings and provides completions.

Use the VS Code settings panel to edit `.gluarc.json` without writing JSON, or edit the file directly. Both update the same configuration.

***

## Settings panel (recommended)

The GLua Settings panel lets you configure GLuaLS without touching JSON. Changes write directly to `.gluarc.json`.

### Opening the panel

Open **GLuaLS: Open GLuaLS Settings** from the Command Palette (`Ctrl+Shift+P`), click the GLuaLS status item, or right-click a `.gluarc.json` file in the Explorer. In a multi-root workspace, choose the folder to configure.

The panel groups settings by the same top-level sections as `.gluarc.json`. Click **Save** to write your changes, or enable **Auto-save settings** in the panel header.

<Tip>
  If you want to inspect the generated JSON, open `.gluarc.json` directly. You can edit both the settings panel and the JSON file, and they stay in sync.
</Tip>

### Auto-save behavior

Auto-save is off by default. Click **Save** after editing.

To change auto-save behavior, toggle **Auto-save settings** in the panel header or set `gluals.gmod.settingsAutoSave` in your VS Code settings.

***

## Manual configuration (.gluarc.json)

### Creating your config

Create a `.gluarc.json` file at the root of your workspace:

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

```json .gluarc.json theme={null}
{
  "$schema": "https://raw.githubusercontent.com/Pollux12/gmod-glua-ls/main/crates/glua_code_analysis/resources/schema.json"
}
```

The `$schema` property enables IDE validation and autocomplete for the file itself.

The settings panel can also create the file for you. Run **GLuaLS: Create GLuaLS Settings** from the Command Palette.

Most projects do not need a starter config. Add only the settings you want to change so new defaults can apply automatically.

### Config file priority

When a workspace has multiple config files, GLuaLS uses this priority order (highest first):

1. `.gluarc.json`
2. `.luarc.json`
3. `.emmyrc.json`
4. `.emmyrc.lua`

`.gluarc.json` is exclusive. If it exists, GLuaLS ignores all other config files.

***

## Configuration reference

The config file is split into top-level sections. Each page lists the available `.gluarc.json` options and related VS Code settings:

<CardGroup cols={2}>
  <Card title="Garry's Mod settings" icon="gamepad-2" href="/configuration/gmod">
    Realm analysis, network checks, scripted classes, hooks, and VGUI
  </Card>

  <Card title="Diagnostics" icon="triangle-alert" href="/configuration/diagnostics">
    Enable, disable, and tune severity of all diagnostic codes
  </Card>

  <Card title="Completion" icon="square-code" href="/configuration/completion">
    Autocomplete behavior, call snippets, postfix trigger, auto-require
  </Card>

  <Card title="Formatting" icon="align-left" href="/configuration/formatting">
    Built-in presets, style overrides, external formatter configuration
  </Card>

  <Card title="Workspace" icon="folder" href="/configuration/workspace">
    Library paths, ignore patterns, module map, encoding
  </Card>

  <Card title="Hints & Hover" icon="lightbulb" href="/configuration/hints-and-hover">
    Inlay hints, inline values, hover, semantic tokens, signature help
  </Card>

  <Card title="Runtime & Strict" icon="settings" href="/configuration/runtime">
    Non-standard symbols, strict type checking, special functions
  </Card>

  <Card title="Annotations management" icon="arrows-rotate" href="/configuration/annotations-management">
    Auto-download Garry's Mod wiki annotations, custom annotation paths
  </Card>
</CardGroup>

***

## VS Code extension settings

Extension settings control the debugger, AI integration, UI preferences, and annotation downloads. Open VS Code **Settings** and search for `gluals` to find them.

Use `.gluarc.json` for analysis behavior. Its settings take precedence over matching VS Code workspace settings.
