GitHub and OpenAI last year launched a “GitHub Copilot” tool that can automatically write code according to the context, freeing programmers from repetitive writing.
The tool has previously supported Visual Studio Code, Neovim, and JetBrains IDEs, among others. Recently, Copilot came to Microsoft’s own Visual Studio 2022, and users can download the extension to use.
Consistent with the method used in Visual Studio Code, developers need to register for GitHub Copilot and wait for official approval before they can use AI programming in Visual Studio 2022.
After approval, users need to go to Extensions > Manage Extensions in Visual Studio 2022, and search for GitHub Copilot to download and install. Currently, GitHub Copilot supports programming languages such as Python, JavaScript, TypeScript, Java, Ruby, and Go.
The code can be written automatically according to the context, including docstrings, comments, function names, and codes. As long as the user gives a prompt, the complete function can be written.