Skip to content

GitLab extension for Visual Studio

The GitLab extension integrates GitLab with Visual Studio for Windows. GitLab for Visual Studio supports GitLab Duo Code Suggestions.

Download the extension

Download the extension from the Visual Studio Marketplace.

The extension requires:

  • Visual Studio 2022, either AMD64 or Arm64.
  • The IntelliCode component for Visual Studio.
  • GitLab version 16.1 and later.
    • GitLab Duo Code Suggestions requires GitLab version 16.8 or later.
  • You are not using Visual Studio for Mac, as it is unsupported.

Configure the extension

After you download and install the extension, you must configure it.

Prerequisites:

To do this:

  1. Install the extension from the Visual Studio Marketplace, and enable it.
  2. In GitLab, create a GitLab personal access token with the api and read_user scopes.
    1. Copy the token. For security reasons, this value is never displayed again, so you must copy this value now.
  3. Open Visual Studio.
    1. On the top bar, go to Tools > Options > GitLab.
    2. For Access Token, paste in your token. The token is not displayed, nor is it accessible to others.
    3. For GitLab URL field, provide the URL of your GitLab instance. For GitLab SaaS, use https://gitlab.com.

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.

Customize keyboard shortcuts

This extension provides these custom commands:

Command name Default keyboard shortcut Feature
GitLab.ToggleCodeSuggestions not applicable Enable or disable automated Code Suggestions.

You can access the extension's custom commands with keyboard shortcuts, which you can customize:

  1. On the top bar, go to Tools > Options.
  2. Go to Environment > Keyboard. Commands exposed by this extension are prefixed with GitLab..
  3. Select a command, and assign it a keyboard shortcut.

Report issues with the extension

Report any issues, bugs, or feature requests in the gitlab-visual-studio-extension issue queue.

Related topics

Troubleshooting

For troubleshooting information, see the extension's troubleshooting page.