Completions

Code completions are text suggestions that appear inline as you type in an editor. These suggestions can be lines or blocks of code based on the context of what you’re writing. Other names for code completions include inline suggestions, ghost text, or inline completions.

Positron Assistant enables completions by default when you authenticate with a language model provider that generates completions, such as GitHub Copilot. Interact with suggestions by:

If you are not receiving suggestions:

Set minimum delay before showing completions

By default, completion suggestions are shown immediately as you write code.

To configure a minimum delay before showing completions, modify the setting editor.inlineSuggest.minShowDelay, which defaults to 0 milliseconds. For example, setting this value to 500 introduces a half-second delay before showing completion suggestions.

Pause code completions

Completions from an LLM such as GitHub Copilot can be super useful, but sometimes they can be distracting or interfere with other completions from the Python or R LSP.

To pause code completions temporarily:

  • Open the Command Palette and run the command Snooze Inline Suggestions and select the duration to snooze completions for; or
  • Click on the Assistant status bar icon, then the Snooze button to snooze completions

To view the remaining time on a snooze, hover over the Assistant status bar icon to see a popup with the remaining time.

To cancel the snooze early:

  • Open the Command Palette and run the command Cancel Snooze Inline Suggestions; or
  • Click on the Assistant status bar icon, then the stop button

Toggle completions on or off for all files

Toggle via the Command Palette

  1. Open the Command Palette and run the command Positron Assistant: Toggle (Enable/Disable) Completions
  2. Completions are now disabled altogether, until you run the command again to enable them

Toggle via the Assistant status bar popup

  1. Click the Assistant status bar icon
  2. In the popup, uncheck All files to disable completions for all files

Enable or disable inline completions by language

Configure via settings

  1. Open the Command Palette and run the command Preferences: Open User Settings
  2. Search for the setting positron.assistant.inlineCompletions.enable
  3. Modify the list of languages and whether completions should be enabled or disabled

Configure via the Assistant status bar popup

  1. Click the Assistant status bar icon
  2. In the popup, uncheck the current file type to disable completions for that file type

Disable inline completions by glob pattern

  1. Open the Command Palette and run the command Preferences: Open User Settings
  2. Search for the setting positron.assistant.inlineCompletionExcludes
  3. Modify the list of glob patterns