Yohohodev

Disabling GitHub Copilot for specific project in VSCode

#GitHub#AI#VSCode

GitHub Copilot is an AI created by Microsoft to help with writing code.

If you're using GitHub Copilot, sometimes, you might need to disable it for a specific project. For instance, if a company doesn't allow using AI for writing code or simply to reduce distractions from constant suggestions.

Here's how you can disable GitHub Copilot in VSCode:

Disabling GitHub Copilot via the VSCode status bar icon

  1. Click on the GitHub Copilot status icon in the bottom panel.
    GitHub Copilot status icon
  2. From the menu, choose Disable Completions or Disable Completions for 'language_mode' and verify.
    GitHub Copilot Disable Completions

Disabling the GitHub Copilot extension in VSCode

  1. Find GitHub Copilot in the list of installed extensions and click on it.
  2. In the extension header, from the dropdown menu, choose Disable (Workspace).
  3. Restart VSCode and verify.

It's also worth mentioning that there have been discussions about adding the ability to disable GitHub Copilot through a .copilotignore file. This would allow disabling GitHub Copilot for a specific project or a specific list of files, which could be quite convenient. Someone has even created their own extension, which works with the .copilotignore file mattickx/copilotignore-vscode, but I haven't tested it.