Code completion
Cloud completion powered by AI Assistant can autocomplete single lines, blocks of code, and even entire functions in real time based on the project context. The generated code is similar to how you would write code, matching your style and naming conventions.
For this functionality, AI Assistant utilizes Mellum, a JetBrains-developed AI model optimized for code completion.
Work with cloud completion in the editor
The suggestions are shown in the editor as you type.
You can also trigger the code completion by pressing Alt+Shift+\.
To apply the suggestion:
Press Tab to accept the entire suggestion. You can configure a different shortcut for this action.
Press Ctrl+Right to accept a suggestion word by word.
Press End to accept a suggestion line by line.
To reject the suggestion, press Escape. Alternatively, just continue to write your own code or change the caret position either with the arrow keys or by a mouse click.
Configure cloud completion
The cloud completion option is enabled by default. To configure the way it works, press Ctrl+Alt+S to open the settings and go to
.Enable the necessary options to personalize your experience with code completion.
Item | Description |
---|---|
Enable cloud completion suggestions | Enable cloud-based code completion and select the file types where you want to use it. |
Universal completion | Enable cloud-based code completion for all other file types. This option is disabled by default. |
Completion policy | This option allows you to control how many code suggestions you receive and how strictly they are filtered for accuracy and relevance. Select the number of suggestions you want to receive:
|
Enable code completion indicator | This option colors the caret in purple to indicate that code completion is invoked ![]() |
Enable automatic completion on typing | When enabled, code completion suggestions are displayed automatically as you type. When disabled, the completion suggestions are shown only when invoked manually via the Alt+Shift+\ shortcut. |
Enable multi-line suggestions | Clear this checkbox to leave only single-line suggestions |
Synchronize inline and popup completions | Select this option to see suggestions listed in a popup that appears in the editor while you type. This way, you can avoid shortcut conflicts. ![]() |
To disable cloud code completion, clear the Enable cloud completion suggestions checkbox on the same settings page or in .
Change the cloud completion shortcut
You can change the default cloud completion shortcut that you use to accept suggestions.
Hover over the suggestion.
In the popup that appears, click
and select the key that you want to use for accepting suggestions.
To assign your own shortcut, select Custom.
You can also change any code completion shortcuts in the
anytime.List of supported file types
This section provides a list of file types that support cloud-based code completion.
- File types covered by the Enable cloud completion suggestions setting
Language/Type
Extension
Java
java
Kotlin
kt
,kts
Python
py
,ipynb
Rust
rs
,rsx
Go
go
C/C++
c
,h
,cpp
,cc
,cp
,hpp
,h++
C#
cs
Ruby
rb
,ruby
,rbw
,ru
RBS
rbs
ERB
erb
,rhtml
PHP
php
,phtml
,phpt
,ctp
Scala
scala
,sbt
Terraform/OpenTofu
tf
,hcl
XML
xml
JSON
json
YAML
yml
,yaml
Properties
properties
Markdown
md
,markdown
,mkd
,mkdn
,rmd
Plain text
txt
HTML
html
,htm
,xhtml
,xht
CSS-like
css
,scss
,sass
,less
JavaScript/TypeScript
js
,jsx
,ts
,tsx
,es6
,sjs
,jsm
,pac
,vue
SQL
sql
,ddl
,db2
,udf
- File types covered by the Universal completion setting
Language / Type
Extension
Python/Cython
pyw
,pyx
,pxd
,pxi
,pyde
Rusty Object Notation
ron
C++
cxx
,c++
,hh
,hxx
,ipp
,tpp
,inl
,tcc
Visual Basic/VBScript/VBA
vb
,vbs
,vba
,bas
,frm
F#
fs
,fsi
,fsx
Swift
swift
PL/SQL
plsql
,plb
,pkb
,pks
,prc
R
r
,rd
Shell scripts
sh
,bash
,zsh
,ksh
,bats
,command
,tmux
Windows Batch
bat
,cmd
PowerShell
ps1
,psm1
,psd1
Objective-C++
mm
Make/ConTeXt
makefile
,mk
,mak
,mkiv
,mkii
,mkvi
CMake
cmake
GYP
gyp
Bazel
bzl
TOML
toml
Docker
dockerfile
Build scripts (Dart, C#, Ruby, etc.)
tool
,cake
,builder
reStructuredText
rst
LaTeX
tex
,sty
,bib
,dtx
,ins
Templates (Ruby, Elixir, .NET, etc.)
mustache
,jinja
,eex
,rabl
,cshtml
,vbhtml
Ruby DSLs
thor
,rake
,jbuilder
,gemspec
LaTeX components
cbx
,bbx
,lbx
Cassandra Query Language
cql
SAP HANA XS JavaScript
xsjslib
Ruby CocoaPods specification
podspec
Collect AI completion logs
If you want to analyze AI completion behavior or report inconsistencies to the customer support, you need to collect logs. To do this:
In the main menu, go to
or press Shift twice to open the search window.Type Collect AI Completion Logs and press Enter.
Click Collect Logs in the Collect Diagnostics Data of AI Completion dialog. This will start the logging process that runs for one minute.
Type your code as you normally would and expect completion.
After the logging process is complete, you will see a confirmation dialog pointing to the log file.
Review the log file and remove any confidential information before sending it to customer support.