Using GitHub Copilot
The Copilot plugin (disabled by default) integrates GitHub Copilot into Qt Creator. You can view suggestions from Copilot in the Edit mode.
To use the Copilot plugin, you need:
- An active GitHub Copilot subscription.
- GitHub Copilot Neovim plugin installed (requires Node.js), as described in Copilot.vim/Readme.md.
To set preferences for using Copilot:
- Select Preferences > Copilot.
- Select the Enable Copilot check box to use Copilot.
- Select Sign In to sign into your subscription, activate your device, and authorize the GitHub Copilot plugin.
The button turns into a Sign Out button.
- In the Node.js path field, enter the full path to the Node.js executable.
- In the Path to agent.js field, enter the path to agent.js in the Copilot Neovim plugin installation folder.
- Select the Auto request check box to receive suggestions for the current text cursor position when you make changes.
- Select the Use proxy check box to use a proxy server to connect to Copilot servers.
- In the Proxy host field, enter the host name of the proxy server.
- In the Proxy port field, enter the port number of the proxy server.
- Select the Reject unauthorized check box to prevent the security risk presented by accepting unauthorized certificates from the proxy server.
- In the Proxy user field, enter the user name to authenticate to the proxy server.
- Select the Save proxy password check box to save the password to authenticate to the proxy server.
Note: The password is saved insecurely.
- In the Proxy password field, enter the password to save. To see the password as you type, select the button.
When you write code in the Edit mode and Auto request is enabled, Copilot automatically makes suggestions when you type.
To manually request a suggestion at the current editor's cursor position, enter t (Request Copilot Suggestion) in the locator.
Hover the mouse over a suggestion to show a toolbar with and buttons for cycling between Copilot suggestions.
To apply a suggestion as a whole, select Apply or press the Tab key.
To apply a suggestion word-by-word, select Apply Word or press Alt+Right.
To reject a suggestion, press Esc or the arrow keys.
You can enable and disable the Copilot suggestions either globally for all projects or at project level for a particular project.
To enable or disable Copilot suggestions globally, select the (Toggle Copilot) button. This also sets the value of the Enable Copilot check box in Preferences accordingly.
To enable or disable Copilot suggestions for a particular project, select Projects > Project Settings > Copilot, and then select or deselect the Enable Copilot check box.
See also Enable and disable plugins.
© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.