Skip to main content

Codiga VS Code Integration for Smart Code Snippets

Compatibility

The VS Code plugin is compatible with VS Code desktop and GitHub codespaces.

How to get the VS Code extension?

You can get it directly from the VS Code marketplace within your VS Code installation. The extension is available on the VS Code marketplace

Using a code snippet

You can use a code snippet by opening the command Codiga: Use Recipe (CTRL + SHIFT + P and search for "Codiga") or by directly using the shortcut CTRL + SHIFT + C.

We have multiple shortcuts that can help you while using Codiga:

For Mac

  • CMD + SHIFT + C opens Codiga Coding Assistant to find snippets based on a search like a google search.

  • CMD + SHIFT + S opens the list of all shortcuts

For Windows

  • CTRL + ALT + C opens Codiga Coding Assistant to find snippets based on a search like a google search.

  • CTRL + ALT + S opens the list of all shortcuts

In vscode, you can also type your keywords on a single line and suggestions from Codiga will automatically appear.

If you did not link your Codiga account, the extension will use only the default code snippets. To use the code snippets you subscribed to and your own private code snippets, you need to link your codiga account (see below).

Using code snippet in VS Code

Shortcuts in VS Code

In order to use shortcuts in python file. Please follow the below steps:

Step 1: Open the file you want to code.

Step 2: Make sure you have opened up a python form.

Step 3: Type the library you want to use, e.g. "aws" followed by a ‘.’ to get a recommendation.

Step 4: Select from the suitable recommendation

PYTHON SHORTCUT DEMO

Done! That's it. Your code snippet is directly imported & populated to your IDE.

Similarly, follow the below steps if you want to use this in your javascript file.

Step 1: Open the file you want to code.

Step 2: Make sure you have opened up a python form .

Step 3: Type the library you want to use, e.g. "react" followed by a ‘.’ to get a recommendation.

Step 4: Select from the suitable recommendation. JS SHORTCUT DEMO

You can also make your code snippets and shortcuts from our dashboard. You can find detailed information on our documentation. Currently, we are working on more code recommendations, i.e. adding more quality code snippets.

Creating a code snippet

To create a code snippet in VS Code, select the code you want to share, click right and select "Create Codiga snippet".

Your browser opens with the code and its language directly initialized.

Create code snippet

Linking your Codiga account

If you want to use the code snippets, you need to link your Codiga account using an API token.

First, create your token on the platform as shown below.

Generating API token

Then, go into the VS Code settings and enter your API Token in the Codiga configuration section.

Using API token

Reporting an issue

You can get help by joining our Slack Community

You can report an issue on the VS Code plugin directly on GitHub.

Resources