github / copilot-language-server-release
Feedback for the GitHub Copilot Language Server
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing github/copilot-language-server-release in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler view@github/copilot-language-server The Copilot Language Server enables any editor or IDE to integrate with GitHub Copilot via the language server protocol. **GitHub Copilot** is an AI pair programmer tool that helps you write code faster and smarter. **Sign up for GitHub Copilot Free!** Please see terms of use for GitHub Copilot Getting Started To integrate with the Copilot Language Server, download the latest release from npm: To run the language server, platform-specific binaries are available as separate packages included as optional dependencies. For example, , for macOS on arm64: example, for macOS on arm64: If repackaging the language server, all platform-specific binaries are available in the releases: https://github.com/github/copilot-language-server-release/releases For example, to download a zip of all of the binaries together: Or you can use Node.js version 20.8 or later: If using the distribution, it is necessary to retain the entire directory contents. Communication with the language server typically happens over stdio with . The distribution additionally supports Node IPC with . Agent Client Protocol (ACP) (Preview) The Copilot Language Server also supports the Agent Client Protocol (ACP), enabling integration with ACP-compatible editors like JetBrains AI Assistant, Zed, and more. Running in ACP Mode To start the language server in ACP mode: Or if installed locally: Communication happens over stdin/stdout. JetBrains AI Assistant To use Copilot as an ACP agent in JetBrains AI Assistant, add the following to your : See the ACP specification for full protocol details. Communication Protocol The Language Server Protocol (LSP) is used to communicate with the client. The base protocol is JSON-RPC 2.0 with additional headers. The Copilot Language Server attempts to follow the LSP spec as closely as possible, but many custom messages are employed to support the unique features of Copilot. Initialization Per the LSP spec, the client is expected to send a request to the language server as a first message. Example parameters: After receiving the response to , the second message the client must send is an notification. Configuration Management After initialization, clients should send a notification to inform the language server about the initial configuration, and again each time the configuration changes. Example parameters: Pull based configuration on is also supported. Workspace Folders Synchronization Workspace folders are optional but highly recommended as they greatly improve the quality of suggestions. See the LSP spec for . Text Document Synchronization Per the LSP spec for text document synchronization, support for , , and is required, using incremental sync. Text Document Focusing Additionally a custom notification should be sent when the client focuses another document (e.g., changing tabs). Example parameters: If no document is focused, a request with no parameters ( ) may be sent. Status Notification The status is sent to the client as a notification. Typically this would be conveyed to the user in a status bar icon or other UI affordance. Notification includes the following fields: • - a string describing the status (can be empty) • - status of the language server: • - When everything is working normally. • - When not authorized and authenticated. • - When there is a temporary issue, such as a failed HTTP request. • - When the current file is ignored due to file size or content exclusions. Authentication To sign in, call . This will return a response like the following: Instruct the user to copy the to their clipboard (and/or copy it programmatically). When the user is ready, invoke to execute the . This will open a browser window that walks the user through the authentication process. Shortly (up to 10 seconds) after the user finishes signing in, you should see a status notification reflecting the new state. If available, the language server will use to open the URL. Otherwise, it will attempt to open the URL natively (e.g., with on macOS). To sign out, call . Inline Completions The request from the draft version of the next LSP spec is used to retrieve inline ("ghost text") completions, with some non-standard additions ( and ) to the parameters: The result is an object containing an array. Newlines in should be normalized as is appropriate for the editor before inserting into the document. The field, per the LSP spec, is called via *after* the user accepts the completion. Copilot uses this for acceptance telemetry. The LSP spec does not provide an event for showing the completion, so a custom is used. Call it with an parameter containing the full completion item: Similarly, for partial acceptance, send a notification with the full item, plus the length (in UTF-16 codepoints) of the completion that was accepted: Note that the includes everything from the start of to the end of the accepted text. It is *not* the length of the accepted text itself. Next Edit Suggestions is a custom method used to retrieve "next edit" suggestions which are inline completions that may include deletions or modifications to existing text and may not be positioned at the cursor. These are similar to inline completions and the API shape is similar as well. But it is a separate method to allow opting into the feature and distinguishing between the two kinds of suggestions. The request parameters are similar to but with a field required as in as : The result is an object containing an array: The field, per the LSP spec, is called via *after* the user accepts the edit. Copilot uses this for acceptance telemetry. The LSP spec does not provide an event for showing the edit, so a custom is used. Call it with an parameter containing the item shown from the array (note only the first argument is required): Panel Completions Panel completions are used for "Open Copilot" style completions. They are similar to inline completions, but ar…