- Supported editor extensions
- Supported languages by IDE
- Support for Infrastructure-as-Code (IaC)
- Manage languages for Code Suggestions
- Add support for more languages
Supported extensions and languages
{{< details >}}
- Tier: Premium, Ultimate
- Add-on: GitLab Duo Pro or Enterprise, GitLab Duo with Amazon Q
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
{{< /details >}}
{{< history >}}
- Changed to require GitLab Duo add-on in GitLab 17.6 and later.
{{< /history >}}
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) | GitLab Workflow for VS Code |
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 by IDE
The following table provides more information on the languages Code Suggestions supports by default, and the IDEs.
Code Suggestions also works with other languages, but you must manually add support.
Language | Web IDE | VS Code | JetBrains IDEs | Visual Studio 2022 for Windows | Neovim |
---|---|---|---|---|---|
C | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”dash-circle” >}} No | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes |
C++ | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes |
C# | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes |
CSS | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”dash-circle” >}} No | {{< icon name=”dash-circle” >}} No | {{< icon name=”dash-circle” >}} No | {{< icon name=”dash-circle” >}} No |
Go | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes |
Google SQL | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes |
HAML | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes |
HTML | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”dash-circle” >}} No | {{< icon name=”dash-circle” >}} No | {{< icon name=”dash-circle” >}} No | {{< icon name=”dash-circle” >}} No |
Java | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes |
JavaScript | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes |
Kotlin | {{< icon name=”dash-circle” >}} No | {{< icon name=”check-circle-filled” >}} Yes (Requires third-party extension providing Kotlin support) | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes |
Markdown | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”dash-circle” >}} No | {{< icon name=”dash-circle” >}} No | {{< icon name=”dash-circle” >}} No | {{< icon name=”dash-circle” >}} No |
PHP | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes |
Python | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes |
Ruby | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes |
Rust | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes |
Scala | {{< icon name=”dash-circle” >}} No | {{< icon name=”check-circle-filled” >}} Yes (Requires third-party extension providing Scala support) | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes |
Shell scripts (bash only)
| {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”dash-circle” >}} No | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes |
Svelte | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes |
Swift | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes |
TypeScript (.ts and .tsx files)
| {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes |
Terraform | {{< icon name=”dash-circle” >}} No | {{< icon name=”check-circle-filled” >}} Yes (Requires third-party extension providing Terraform support) | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”dash-circle” >}} No | {{< icon name=”check-circle-filled” >}} Yes (Requires third-party extension providing the terraform file type)
|
Vue | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes | {{< icon name=”check-circle-filled” >}} Yes |
{{< alert type=”note” >}}
Some languages are not supported in all JetBrains IDEs, or might require additional plugin support. Refer to the JetBrains documentation for specifics on your IDE.
{{< /alert >}}
Support for Infrastructure-as-Code (IaC)
Code Suggestions works with infrastructure-as-code interfaces, including:
- Kubernetes Resource Model (KRM)
- Google Cloud CLI
- Terraform
Manage languages for Code Suggestions
{{< history >}}
- Introduced in GitLab Workflow for VS Code 4.21.0
{{< /history >}}
You can customize your coding experience in VS Code by enabling or disabling Code Suggestions for specific supported languages.
You can do this by editing your settings.json
file directly, or from the VS Code user interface:
- 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 ({{< icon name=”settings” >}}).
- Select Extension Settings.
- In your User settings, find the section titled AI Assisted Code Suggestions: Enabled Supported Languages.
- To enable Code Suggestions for a language, select its checkbox.
- To disable Code Suggestions for a language, clear its checkbox.
- Your changes are automatically saved, and take effect immediately.
When you disable Code Suggestions for a language, the Duo icon changes to show that suggestions are disabled for this language. On hover, it shows Code Suggestions are disabled for this language.
Add support for more languages
If your desired language doesn’t have Code Suggestions available by default, you can add support for your language locally. However, Code Suggestions might not function as expected.
{{< tabs >}}
{{< tab title=”Visual Studio Code” >}}
Prerequisites:
- You have installed and enabled the GitLab Workflow extension for VS Code.
- You have completed the VS Code 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. You need the Identifier for your languages in 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 ({{< icon name=”settings” >}}).
- Select Extension Settings.
- In your User settings, find GitLab › Ai Assisted Code Suggestions: Additional Languages and select Add Item.
- In Item, add the identifier for each language you want to support. Identifiers should be
lowercase, like
html
orpowershell
. Don’t add leading periods from file suffixes to each identifier. - Select OK.
{{< /tab >}}
{{< tab title=”JetBrains IDEs” >}}
Prerequisites:
- You have installed and enabled the GitLab plugin for JetBrains IDEs.
- You have completed the Jetbrains 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. You need the identifier for your languages in a later step.
- In your IDE, on the top bar, select your IDE name, then select Settings.
- On the left sidebar, select Tools > GitLab Duo.
- Under Code Suggestions Enabled Languages > Additional languages, add the identifier for each language
you want to support. Identifiers should be in lowercase, like
html
. Separate multiple identifiers with commas, likehtml,powershell,latex
, and don’t add leading periods to each identifier. - Select OK.
{{< /tab >}}
{{< /tabs >}}