ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

LSP-copilot

GitHub Copilot support for Sublime Text LSP plugin provided through Copilot.vim.

Details

Installs

  • Total 13K
  • Win 4K
  • Mac 6K
  • Linux 3K
Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2 Mar 1 Feb 29 Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13 Feb 12
Windows 1 10 13 9 10 7 9 9 11 13 16 7 10 13 15 13 10 8 6 4 12 6 12 15 18 10 10 10 14 8 21 11 11 14 10 13 13 13 7 11 8 15 12 8 7 14
Mac 2 20 13 13 6 11 14 19 24 20 14 9 6 10 25 15 18 21 5 4 18 20 15 23 25 7 16 13 20 21 26 17 13 12 21 19 27 16 8 7 8 14 16 13 19 13
Linux 7 15 10 10 5 1 9 19 8 5 14 5 10 17 8 8 12 8 3 7 9 13 13 10 5 1 5 14 11 10 8 7 9 4 9 8 7 6 7 4 7 6 14 12 2 10

Readme

Source
raw.​githubusercontent.​com

LSP-copilot

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.

Prerequisites

  • Public network connection.
  • Active GitHub Copilot subscription.

Installation

  1. Install LSP and LSP-copilot via Package Control.
  2. Restart Sublime Text.

Setup

On the first time use, follow the steps below:

  1. Open any file.
  2. Execute Copilot: Sign In from the command palette.
  3. Follow the prompts to authenticate LSP-copilot.
    1. The User Code will be auto copied to your clipboard.
    2. Paste the User Code into the pop-up GitHub authentication page.
    3. Return to Sublime Text and press OK on the dialog.
    4. If you see a “sign in OK” dialog, LSP-copilot should start working since then.

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.
commit_completion_on_tab boolean true Use the Tab key for committing Copilot's completion. This may conflict with Sublime Text's auto_complete_commit_on_tab setting.
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.
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).

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...
 }