This is the GitLab extension for Visual Studio (Community/Pro/Enterprise).
This is not the extension for Visual Studio Code.
All feedback should be directed to this issue.
Minimum Supported Version
The GitLab for Visual Studio extension supports Code Suggestions for both GitLab SaaS and GitLab self-managed.
This extension only supports Visual Studio 2022 as of the beta release.
Setup
This extension requires you to create a GitLab personal access token, and assign it to the extension:
- Install the extension from the Visual Studio Marketplace and enable it.
- Create a GitLab Personal Access Token with the
api
and read_user
scopes:
- Copy the token. For security reasons, this value is never displayed again, so you must copy this value now.
- Open Visual Studio, then navigate to
Tools
-> Options
-> GitLab
- Paste the recently created token in to the
Access Token
field. The token is not displayed, nor is it accessible to others.
- Provide the URL of your GitLab instance in the
GitLab URL
field. For GitLab SaaS, use https://gitlab.com
.
Features
Code Suggestions (Beta)
Write code more efficiently by using generative AI to suggest code while you’re developing. To learn more about this feature, see the
Code Suggestions documentation
This feature is in
Beta
Code Suggestions is a generative artificial intelligence (AI) model. GitLab currently leverages Google Cloud’s Vertex AI Codey API models
No new additional data is collected to enable this feature. Private non-public GitLab customer data is not used as training data.
Learn more about Google Vertex AI Codey APIs Data Governance
Beta users should read about the known limitations
Supported Languages
- C++
- C#
- Go
- Google SQL
- Java
- JavaScript
- Kotlin
- PHP
- Python
- Ruby
- Rust
- Scala
- Swift
- TypeScript
Usage
Tab
accepts suggestion
Escape
dismisses suggestion
Status Bar
A status icon is displayed in the status bar. It provides the following:
- A button that can quickly disable/enable code suggestions.
- Display a code suggestion in progress icon.
- Display an error icon and provide an error message as tooltip.
- Before the extension has been configured, the error icon will be shown with a message about configuration.

Troubleshooting
See the troubleshooting documentation.
Report issues in the
feedback issue.
Contributing
This extension is open source and hosted on GitLab. Contributions are more than welcome and subject to the terms set forth in CONTRIBUTING -- feel free to fork and add new features or submit bug reports. See CONTRIBUTING for more information.