Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 2.1 KB

File metadata and controls

46 lines (35 loc) · 2.1 KB

Get Started

Setting Up GitHub Copilot in Visual Studio Code. If you are using GitHub Codespaces, all required extensions and packages should be installed already

  1. Install Visual Studio Code:

    • If you haven't already, download and install Visual Studio Code from here.
  2. Install GitHub Copilot:

    • Open Visual Studio Code.
    • Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window or by pressing Cmd+Shift+X.
    • Search for "GitHub Copilot" and click the "Install" button.
  3. Sign In to GitHub Copilot:

    • After installation, you will be prompted to sign in to GitHub Copilot.
    • Follow the on-screen instructions to authenticate with your GitHub account.
  4. Verify Installation:

    • Open a new file in Visual Studio Code.
    • Start typing a comment or a piece of code, and you should see suggestions from GitHub Copilot.
    • If you see suggestions, GitHub Copilot is successfully installed and ready to use.
  5. Basic Usage:

    • Create a new JavaScript file (example.js).
    • Start typing a function definition, e.g. function add(a, b) {.
    • Observe how GitHub Copilot suggests the implementation of the function.
    • Accept the suggestion by pressing Tab.
  6. Exploring Different Features:

    • Code Completions:
      • Start typing a comment or code, and GitHub Copilot will provide inline suggestions.
      • Accept suggestions by pressing Tab.
    • Chat:
      • Open the Command Palette (Cmd+Shift+P).
      • Type "GitHub Copilot: Chat" and select it.
      • Use the chat interface to ask questions or request code snippets.
    • Inline Chat:
      • Highlight a piece of code.
      • Right-click and select "Ask GitHub Copilot".
      • Use the inline chat to get explanations or improvements for the selected code.

By the end of this step, you should have GitHub Copilot ready and be familiar with its basic functionality, including code completions, chat, and inline chat in Visual Studio Code.


Next