Featured image of post 在 IntelliJ IDEA 中使用 GitHub Copilot

在 IntelliJ IDEA 中使用 GitHub Copilot

简介

GitHub Copilot 是 GitHub 开发的基于 AI 的代码补全工具。 通过在开发环境 IntelliJ IDEA 中安装 GitHub Copilot 插件,您就可以在 IntelliJ IDEA 中使用 GitHub Copilot。 要激活它,需要一个 GitHub 账号。

安装方法

  1. 从 IntelliJ IDEA 的菜单 File 中选择 Settings
  2. 选择 Plugins,然后搜索“GitHub Copilot” img.png
  3. 点击 Install 按钮进行安装 img_1.png
  4. 点击 Restart IDE 按钮重启 IntelliJ IDEA img_2.png img_3.png 重启 IntelliJ IDEA 后,安装即告完成。

激活

  1. 点击右下角的图标
  2. 点击 Login to Github img_4.png
  3. 点击 Copy and Open 按钮 img_6.png
  4. 浏览器将会启动,如果尚未登录 GitHub,请先登录,然后按 Ctrl+V 粘贴代码并点击 Continue 按钮 img_7.png
  5. 点击 Authorize GitHub Copilot Plugin 按钮 img_8.png img_9.png 显示上述界面后,激活即告完成。

试用

img_10.png 在 IntelliJ IDEA 编辑器中输入几个字符后,GitHub Copilot 将会为您提供后续代码的建议。 现在,请享受 AI 带来的强大补全功能吧!

comments powered by Disqus
使用 Hugo 构建
主题 StackJimmy 设计