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 17K
  • Win 6K
  • Mac 8K
  • Linux 4K
Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8
Windows 3 5 15 5 3 5 7 7 13 5 8 10 8 7 11 10 8 2 11 7 7 8 10 8 7 3 4 4 16 10 8 5 9 11 13 7 16 7 5 9 14 9 3 12 12 3
Mac 1 8 11 2 6 6 9 8 12 12 5 3 18 8 10 9 14 11 8 8 12 12 14 7 6 9 17 16 10 11 14 6 6 17 12 12 9 4 4 6 17 9 12 17 16 5
Linux 4 4 3 3 2 11 6 13 5 8 5 4 5 7 2 4 11 9 2 5 7 3 3 10 0 6 6 4 5 8 3 0 3 8 6 6 6 14 7 5 6 8 9 8 1 2

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.

Features

  • [x] Inline completion popup.
  • [x] Inline completion phantom.
  • [x] Panel completion.
  • [x] Chat.

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

Copilot

Inline Completion Phantom

Copilot

Panel Completion

Copilot

Chat

Copilot

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