Giter VIP home page Giter VIP logo

lsp-copilot's Introduction

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

Pressing Tab commits autocompletion rather than Copilot's suggestion

There is no way for a plugin to know which one is wanted. But you can define your own dedicate keybinding to commit Copilot's suggestion.

{
    "keys": ["YOUR_OWN_DEDICATE_KEYBINDING"],
    "command": "copilot_accept_completion",
    "context": [
        {
            "key": "setting.copilot.completion.is_visible"
        }
    ]
},

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

lsp-copilot's People

Contributors

jfcherng avatar terminalfi avatar timfjord avatar sofi-terminal avatar morehawes avatar nsubiron avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.