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

# Inlay hints

> Contextual labels shown inline in the editor for parameter names, types, and more.

## Overview

Inlay hints show small labels **inside your code** without changing the file. They can show parameter names for positional arguments, inferred types for untyped locals, and index keys in large tables.

## Types of hints

### Parameter name hints

When calling a function, GLuaLS can show the parameter names next to each argument:

```lua theme={null}
ents.Create(/*classname:*/ "prop_physics")
SetGlobalString(/*index:*/ "CurrentMap", /*val:*/ "gm_flatgrass")
```

Enable with `hint.paramHint`:

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

```json .gluarc.json theme={null}
{
  "hint": {
    "paramHint": true
  }
}
```

### Local type hints

Show the inferred type of untyped `local` declarations:

```lua theme={null}
local ent /*: Entity*/ = ents.Create("base_gmodentity")
local name /*: string*/ = ent:GetName()
```

Enable with `hint.localHint`:

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

```json .gluarc.json theme={null}
{
  "hint": {
    "localHint": true
  }
}
```

### Array/table index hints

Show implicit numeric keys in table literals:

```lua theme={null}
local t = {
    /*[1]:*/ "first",
    /*[2]:*/ "second",
    /*[3]:*/ "third",
}
```

Enable with `hint.indexHint`:

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

```json .gluarc.json theme={null}
{
  "hint": {
    "indexHint": true
  }
}
```

### Override hints

Show when a method overrides a parent class method:

```lua theme={null}
function ENT:Think() --[[ override ]]
    -- ...
end
```

Enable with `hint.overrideHint`.

### Closing end hints

Show which `do...end` or `function...end` block an `end` closes. This helps in nested code:

```lua theme={null}
function MyAddon.LongFunction()
    for i = 1, 100 do
        if condition then
            -- ...
        end --[[ if condition ]]
    end --[[ for i = 1, 100 ]]
end --[[ function MyAddon.LongFunction ]]
```

Enable with `hint.closingEndHint`.

## Global configuration

You can toggle each hint type. This example shows the available settings:

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

```json .gluarc.json theme={null}
{
  "hint": {
    "paramHint": true,
    "localHint": false,
    "indexHint": false,
    "overrideHint": true,
    "closingEndHint": false,
    "closingEndHintControlFlow": false,
    "closingEndHintMinLines": 15,
    "enumParamHint": true,
    "metaCallHint": true
  }
}
```

### Additional hint settings

| Setting                          | Default | Description                                                      |
| -------------------------------- | ------- | ---------------------------------------------------------------- |
| `hint.enumParamHint`             | `false` | Show named enum values for numeric arguments matching enum types |
| `hint.metaCallHint`              | `true`  | Show call hints for `__call` metamethod invocations              |
| `hint.closingEndHintControlFlow` | `false` | Include control flow constructs in closing-end hints             |
| `hint.closingEndHintMinLines`    | `15`    | Minimum number of lines before GLuaLS shows closing-end hints    |

### Strict mode array index hints

`strict.arrayIndex` controls whether implicit numeric table keys are treated as strict index hints and diagnostics.

```json .gluarc.json theme={null}
{
  "strict": {
    "arrayIndex": true
  }
}
```

## Inline values

During a debug session, GLuaLS can show current local variable values beside the code, like an inline variable inspector:

```lua theme={null}
local hp = ply:Health()  -- 75
local pos = ply:GetPos() -- Vector(512, 248, 64)
```

Enable with:

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

```json .gluarc.json theme={null}
{
  "inlineValues": {
    "enable": true
  }
}
```

## VS Code integration

When enabled, inlay hints appear inline in the editor. Choose which hint types to display in the [settings panel](/configuration/overview#settings-panel-recommended). See [Hints & Hover settings](/configuration/hints-and-hover) for the full reference.
