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 to accept. Enabled by default for all writer fields – no configuration required.

Copilot Toolbar Button

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

Inline Suggestions

Ghost text appears after a brief pause – press to accept, keep typing to dismiss.

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.1-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. Customize the debounce duration (in milliseconds) in your configuration:

config.php
return [
    'johannschopplich.copilot' => [
        'completion' => [
            'debounce' => 1500 // Wait 1.5 seconds
        ]
    ]
];
The default debounce is 1000ms (1 second). Values below 500ms are clamped to 500ms to prevent excessive API calls.