- Supported editor extensions
- Supported languages
- View Multiple Code Suggestions
- Experimental features
Supported extensions and languages
Code Suggestions is available in the following editor extensions and for the following languages.
Supported editor extensions
To use Code Suggestions, use one of these editor extensions:
IDE | Extension |
---|---|
Visual Studio Code (VS Code) | VS Code GitLab Workflow extension |
GitLab Web IDE (VS Code in the Cloud) | No configuration required. |
Microsoft Visual Studio (2022 for Windows) | Visual Studio GitLab extension |
JetBrains IDEs | GitLab Duo Plugin for JetBrains |
Neovim | gitlab.vim plugin
|
A GitLab Language Server is used in VS Code, Visual Studio, and Neovim. The Language Server supports faster iteration across more platforms. You can also configure it to support Code Suggestions in IDEs where GitLab doesn’t provide official support.
You can express interest in other IDE extension support in this issue.
Supported languages
Code Suggestions is aware of common popular programming languages, concepts, and infrastructure-as-code interfaces, like Kubernetes Resource Model (KRM), Google Cloud CLI, and Terraform.
Code Suggestions supports these languages:
Language | VS Code | JetBrains IDEs | Visual Studio 2022 for Windows | Neovim |
---|---|---|---|---|
C | Yes | No | Yes | Yes |
C++ | Yes | Yes | Yes | Yes |
C# | Yes | Yes | Yes | Yes |
CSS | Yes | Yes | Yes | Yes |
Go | Yes | Yes | Yes | Yes |
Google SQL | Yes | Yes | Yes | Yes |
HTML | Yes | Yes | Yes | Yes |
Java | Yes | Yes | Yes | Yes |
JavaScript | Yes | Yes | Yes | Yes |
Kotlin |
Yes (Requires third-party extension providing Kotlin support) | Yes | Yes | Yes |
Markdown | Yes | Yes | Yes | Yes |
PHP | Yes | Yes | Yes | Yes |
Python | Yes | Yes | Yes | Yes |
Ruby | Yes | Yes | Yes | Yes |
Rust | Yes | Yes | Yes | Yes |
Scala |
Yes (Requires third-party extension providing Scala support) | Yes | Yes | Yes |
Shell scripts (bash only)
| Yes | Yes | Yes | Yes |
Swift | Yes | Yes | Yes | Yes |
TypeScript | Yes | Yes | Yes | Yes |
Terraform |
Yes (Requires third-party extension providing Terraform support) | Yes | No |
Yes (Requires third-party extension providing the terraform file type)
|
For languages not listed in the table, Code Suggestions might not function as expected.
View Multiple Code Suggestions
- Introduced in GitLab 17.1.
For a code completion suggestion in VS Code, multiple suggestion options might be available. To view all available suggestions:
- Hover over the code completion suggestion.
- Scroll through the alternatives. Either:
- Use keyboard shortcuts. Press Option + `]` to view the next suggestion, and Option + `[` to view the previous suggestions.
- Select the right or left arrow to see next or previous options.
- Press Tab to apply the suggestion you prefer.
Experimental features
Add support for more languages for Code Suggestions in VS Code
- Introduced as an experiment in GitLab 17.0.
If your desired language isn’t a supported language for Code Suggestions, you can add support for it locally.
Prerequisites:
- You have installed and enabled the GitLab Workflow extension for VS Code.
- You have completed the extension setup instructions, and authorized the extension to access your GitLab account.
To do this:
- Find your desired language in the list of language identifiers for VS Code. You need the Identifier for a later step.
- In VS Code, open the extension settings for GitLab Workflow:
- On the top bar, go to Code > Settings > Extensions.
- Search for GitLab Workflow in the list, and select Manage ().
- Select Extension Settings.
- In your User settings, find GitLab › Ai Assisted Code Suggestions: Additional Languages and select Add Item.
- In Item, add the language identifier, and select OK.