Problem
Inline code completion shows grey suggestions with names that do not exist in the project. Example: type a Kotlin constructor call and pause. The editor suggests named arguments that are not in the constructor signature, and the names do not appear anywhere in the codebase:
offline = ScreenResponse.Metadata.Offline(
isOffline = false,
offlineMessage = null
)
The constructor has one parameter, expiryTimestamp: Instant? = null. Turning off the options on the Settings | Editor | General | Code Completion | Inline page does not remove the suggestions.
Other phrases for this problem: AI completion hallucinates, inline suggestions are wrong, code completion invents parameters, autocomplete quality dropped.
Cause
The GitHub Copilot plugin is installed and shows its own inline suggestions. They look the same as JetBrains inline completion: grey text in the editor that Tab accepts. The JetBrains options on the Inline page do not control Copilot suggestions, so turning them off has no effect.
Three providers can show inline suggestions in a JetBrains IDE:
| Provider | Controlled by |
|---|---|
| Full Line code completion (local model) | Settings | Editor | General | Code Completion | Inline, Local option |
| JetBrains AI cloud completion | Settings | Editor | General | Code Completion | Inline, cloud option; needs JetBrains AI |
| GitHub Copilot | The GitHub Copilot plugin and its own settings |
Resolution
- Open Settings | Plugins and select the Installed tab.
- Find GitHub Copilot and disable the plugin.
- Restart the IDE.
- Type the same code again and pause.
If the incorrect suggestions stop, they came from GitHub Copilot. To keep the plugin for other features, turn off its inline suggestions in the GitHub Copilot plugin settings instead. Report the quality of Copilot suggestions to GitHub, because JetBrains does not maintain the plugin.
If the suggestions continue with Copilot disabled, they come from JetBrains completion. Clear Enable inline completion using language models on the Inline page to turn them off. How to disable AI-powered code completion? describes all the options that turn off AI-powered code completion. The Full Line code completion documentation describes the Local option.
Comments
0 comments
Please sign in to leave a comment.