---
title: "Inline Suggestions"
description: "Ghost text appears as you type in writer fields – press Tab to accept, Escape to dismiss, or just keep typing to ignore."
canonical_url: "https://kirby.tools/docs/copilot/usage/inline-suggestions"
---

# Inline Suggestions

> Ghost text appears as you type in writer fields – press Tab to accept, Escape to dismiss, or just keep typing to ignore.

Pause typing in any writer field and Copilot suggests a continuation – press <kbd value="tab">



</kbd>

 to accept. Enabled by default for all writer fields – no configuration required.

<card-group>
<card icon="i-ri-sparkling-line" title="Copilot Toolbar Button" to="/docs/copilot/usage/toolbar-buttons">

Open the prompt dialog from the writer toolbar – generate or edit larger text blocks, with selection awareness.

</card>

<card icon="i-ri-magic-line" title="Inline Suggestions" to="#how-it-works">

Ghost text appears after a brief pause – press <kbd value="tab">



</kbd>

 to accept, keep typing to dismiss.

</card>
</card-group>

## How It Works

After a brief pause in typing (1 second by default), Copilot analyzes your current text and suggests a completion. The suggestion appears as ghost text in a subtle gray color after your cursor. Press <kbd value="tab">



</kbd>

 (Tab) to accept it, <kbd value="escape">



</kbd>

 to dismiss it – or just keep typing.

<note>

When a request to the provider fails, Copilot waits 30 seconds before suggesting again, rather than asking once more at every pause in typing. The manual trigger still works during that time – use it to retry immediately.

</note>

<warning>

When you define **custom marks** in your writer field blueprint, you must explicitly include the `copilot-suggestions` mark to enable inline suggestions:

```yaml
fields:
  text:
    type: writer
    marks:
      - bold
      - italic
      # Append the Copilot toolbar button
      - copilot
      # Enable inline suggestions
      - copilot-suggestions
```

</warning>

## Keyboard Shortcuts

<table>
<thead>
  <tr>
    <th>
      Action
    </th>
    
    <th>
      Shortcut
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Accept suggestion
    </td>
    
    <td>
      <kbd value="tab">
        
      </kbd>
      
       (Tab)
    </td>
  </tr>
  
  <tr>
    <td>
      Dismiss suggestion
    </td>
    
    <td>
      <kbd value="escape">
        
      </kbd>
    </td>
  </tr>
  
  <tr>
    <td>
      Trigger manually
    </td>
    
    <td>
      <kbd value="meta">
        
      </kbd>
      
       <kbd value=",">
        
      </kbd>
      
       (macOS) / <kbd value="CTRL">
        
      </kbd>
      
       <kbd value=",">
        
      </kbd>
      
       (Windows/Linux)
    </td>
  </tr>
</tbody>
</table>

<tip>

By default, inline suggestions only trigger at the **end of a text node** – after a pause in typing. Use the manual trigger (<kbd value="meta">



</kbd>

 <kbd value=",">



</kbd>

 / <kbd value="CTRL">



</kbd>

 <kbd value=",">



</kbd>

) to request a suggestion **between words** or in the middle of a sentence.

</tip>

## Completion Model

Inline suggestions use a dedicated lightweight model optimized for speed. Configure the `completionModel` per provider in your [global configuration](/docs/copilot/configuration/global#default-models):

```php [config.php]
return [
    'johannschopplich.copilot' => [
        'provider' => 'google',
        'providers' => [
            'google' => [
                'apiKey' => env('GOOGLE_API_KEY'),
                'model' => 'gemini-3.1-pro-preview',
                 // Fast model for completions
                'completionModel' => 'gemini-3.5-flash'
            ]
        ]
    ]
];
```

## Disabling Automatic Suggestions

To stop ghost text from appearing on its own in all writer fields:

```php [config.php]
return [
    'johannschopplich.copilot' => [
        'completion' => false
    ]
];
```

The manual trigger keeps working – press <kbd value="meta">



</kbd>

 <kbd value=",">



</kbd>

 whenever you do want a suggestion. To take inline suggestions out of a field altogether, leave the `copilot-suggestions` mark out of its blueprint.

## Customizing Debounce Timing

The debounce controls how long Copilot waits after you stop typing before suggesting a completion. Customize the debounce duration (in milliseconds) in your configuration:

```php [config.php]
return [
    'johannschopplich.copilot' => [
        'completion' => [
            'debounce' => 1500 // Wait 1.5 seconds
        ]
    ]
];
```

<note>

The default debounce is 1000ms (1 second). Values below 500ms are clamped to 500ms to prevent excessive API calls.

</note>

---

Every page of this site as Markdown: <https://kirby.tools/sitemap.md>
