LSP-copilot
GitHub Copilot support for Sublime Text LSP plugin provided through Copilot.vim.
Details
Installs
- Total 19K
- Win 6K
- Mac 9K
- Linux 4K
Jan 21 | Jan 20 | Jan 19 | Jan 18 | Jan 17 | Jan 16 | Jan 15 | Jan 14 | Jan 13 | Jan 12 | Jan 11 | Jan 10 | Jan 9 | Jan 8 | Jan 7 | Jan 6 | Jan 5 | Jan 4 | Jan 3 | Jan 2 | Jan 1 | Dec 31 | Dec 30 | Dec 29 | Dec 28 | Dec 27 | Dec 26 | Dec 25 | Dec 24 | Dec 23 | Dec 22 | Dec 21 | Dec 20 | Dec 19 | Dec 18 | Dec 17 | Dec 16 | Dec 15 | Dec 14 | Dec 13 | Dec 12 | Dec 11 | Dec 10 | Dec 9 | Dec 8 | Dec 7 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 1 | 15 | 6 | 8 | 5 | 5 | 8 | 13 | 10 | 10 | 4 | 19 | 8 | 13 | 12 | 13 | 3 | 9 | 14 | 19 | 7 | 5 | 15 | 10 | 11 | 4 | 8 | 8 | 18 | 13 | 10 | 14 | 21 | 28 | 13 | 10 | 13 | 6 | 4 | 10 | 8 | 8 | 4 | 10 | 6 | 3 |
Mac | 0 | 9 | 8 | 5 | 11 | 11 | 8 | 10 | 9 | 5 | 4 | 8 | 15 | 13 | 10 | 6 | 4 | 2 | 6 | 5 | 8 | 9 | 6 | 10 | 10 | 9 | 13 | 9 | 21 | 17 | 11 | 14 | 20 | 46 | 25 | 14 | 12 | 8 | 5 | 10 | 17 | 11 | 8 | 9 | 9 | 7 |
Linux | 0 | 12 | 6 | 9 | 5 | 13 | 4 | 9 | 4 | 5 | 7 | 10 | 6 | 10 | 5 | 11 | 4 | 7 | 9 | 4 | 3 | 5 | 4 | 4 | 3 | 5 | 4 | 5 | 7 | 9 | 9 | 10 | 6 | 22 | 9 | 3 | 9 | 4 | 2 | 5 | 5 | 7 | 8 | 6 | 5 | 6 |
Readme
- Source
- raw.githubusercontent.com
LSP-copilot
GitHub Copilot support for Sublime Text LSP plugin provided through Copilot.vim.
This plugin uses Copilot distribution which uses OpenAI Codex to suggest codes and entire functions in real-time right from your editor.
Features
- [x] Inline completion popup.
- [x] Inline completion phantom.
- [x] Panel completion.
- [x] Chat.
Prerequisites
- Public network connection.
- Active GitHub Copilot subscription.
Installation
- Install LSP and LSP-copilot via Package Control.
- Restart Sublime Text.
Setup
On the first time use, follow the steps below:
- Open any file.
- Execute
Copilot: Sign In
from the command palette. - Follow the prompts to authenticate LSP-copilot.
- The
User Code
will be auto copied to your clipboard. - Paste the
User Code
into the pop-up GitHub authentication page. - Return to Sublime Text and press
OK
on the dialog. - If you see a “sign in OK” dialog, LSP-copilot should start working since then.
- The
Settings
Settings are provide in the LSP-copilot.sublime-settings
file, accessible using Preferences: LSP-copilot Settings
in the command palette.
Setting | Type | Default | Description |
---|---|---|---|
auto_ask_completions | boolean | true | Auto ask the server for completions. Otherwise, you have to trigger it manually. |
debug | boolean | false | Enables debug mode for LSP-copilot. Enabling all commands regardless of status requirements. |
hook_to_auto_complete_command | boolean | false | Ask the server for completions when the auto_complete command is called. |
authProvider | string | The GitHub identity to use for Copilot | |
github-enterprise | object | The configuration for Github Enterprise | |
local_checks | boolean | false | Enables local checks. This feature is not fully understood yet. |
telemetry | boolean | false | Enables Copilot telemetry requests for Accept and Reject completions. |
proxy | string | The HTTP proxy to use for Copilot requests. It's in the form of username:password@host:port or just host:port . |
|
completion_style | string | popup | Completion style. popup is the default, phantom is experimental (there are well-known issues). |
Screenshots
Inline Completion Popup
Inline Completion Phantom
Panel Completion
Chat
FAQs
I don't want to use Tab
for committing Copilot's completion
It's likely that Copilot's completion appears along with Sublime Text's autocompletion
and both of them use Tab
for committing the completion. This may cause a nondeterministic result.
Thus, you may want to let only one of them (or none) use the Tab
key.
If you don't want LSP-copilot to use the Tab
key for committing the completion.
You can set LSP-copilot's commit_completion_on_tab
setting to false
and add a custom keybinding like below.
{
"keys": ["YOUR_OWN_DEDICATE_KEYBINDING"],
"command": "copilot_accept_completion",
"context": [
{
"key": "copilot.is_on_completion"
}
]
},
I see UNABLE_TO_GET_ISSUER_CERT_LOCALLY
error
If working behind a VPN and/or Proxy, you may be required to add your CA file into the NODE environment. See below for LSP-copilots support for this.
In LSP-copilot's plugin settings, add the following env
key:
{
"env": {
"NODE_EXTRA_CA_CERTS": "/path/to/certificate.crt",
},
// other custom settings...
}