Inline Suggestions

AI-powered inline text suggestions for writer fields.

Writer fields support AI-powered inline suggestions that appear as ghost text after a brief pause in typing. This feature is enabled by default for all writer fields – no configuration required.

Inline suggestions and the toolbar button complement each other: use inline suggestions for quick writing flow, and the toolbar button for generating or editing larger text blocks via the prompt dialog.

Copilot Toolbar Button

Opens the Copilot prompt dialog to generate or edit text.

  • Visible in toolbar
  • Opens prompt dialog
  • Works with selected text

Inline Suggestions

Text completions appear as ghost text after you pause typing.

  • Enabled by default
  • Automatic suggestions
  • Tab to accept

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 (Tab) to accept it, Esc to dismiss it – or just keep typing.

When you define custom marks in your writer field blueprint, you must explicitly include the copilot-suggestions mark to enable inline suggestions:
fields:
  text:
    type: writer
    marks:
      - bold
      - italic
      # Append the Copilot toolbar button
      - copilot
      # Enable inline suggestions
      - copilot-suggestions

Keyboard Shortcuts

ActionShortcut
Accept suggestion (Tab)
Dismiss suggestionEsc
Trigger manually , (macOS) / CTRL , (Windows/Linux)
By default, inline suggestions only trigger at the end of a text node – after a pause in typing. Use the manual trigger ( , / CTRL,) to request a suggestion between words or in the middle of a sentence.

Completion Model

Inline suggestions use a dedicated lightweight model optimized for speed. Configure the completionModel per provider in your global configuration:

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

Disabling Inline Suggestions

To disable inline suggestions globally for all writer fields:

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

Customizing Debounce Timing

The debounce controls how long Copilot waits after you stop typing before suggesting a completion. The default is 1000ms (1 second). You can customize this:

config.php
return [
    'johannschopplich.copilot' => [
        'completion' => [
            'debounce' => 1500 // Wait 1.5 seconds
        ]
    ]
];
The minimum debounce is 500ms to prevent excessive API calls.