From a5797c96a7045e11b88a548d3ed481102fececb7 Mon Sep 17 00:00:00 2001 From: Serhii Vechrenko Date: Sat, 31 Jan 2026 18:36:13 -0800 Subject: [PATCH] docs: add LSP server configuration guide to README --- README.md | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/README.md b/README.md index d5dae01..2e62b99 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,64 @@ Each time you submit a prompt to GitHub Copilot CLI, your monthly quota of premi For more information about how to use the GitHub Copilot CLI, see [our official documentation](https://docs.github.com/copilot/concepts/agents/about-copilot-cli). +## 🔧 Configuring LSP Servers + +GitHub Copilot CLI supports Language Server Protocol (LSP) for enhanced code intelligence. This feature is currently experimental and provides intelligent code features like go-to-definition, hover information, and diagnostics. + +### Enabling LSP Support + +To use LSP features, you must enable experimental mode: + +```bash +copilot --experimental +``` + +Or use the `/experimental` command within an interactive session. + +### Installing Language Servers + +Copilot CLI does not bundle LSP servers. You need to install them separately. For example, to set up TypeScript support: + +```bash +npm install -g typescript-language-server +``` + +For other languages, install the corresponding LSP server and configure it following the same pattern shown below. + +### Configuring LSP Servers + +LSP servers are configured through a dedicated LSP configuration file. You can configure LSP servers at the user level or repository level: + +**User-level configuration** (applies to all projects): +Edit `~/.copilot/lsp-config.json` + +**Repository-level configuration** (applies to specific project): +Create `.github/lsp.json` in your repository root + +Example configuration: + +```json +{ + "lspServers": { + "typescript": { + "command": "typescript-language-server", + "args": ["--stdio"], + "disabled": false, + "fileExtensions": { + ".ts": "typescript", + ".tsx": "typescript" + } + } + } +} +``` + +### Viewing LSP Server Status + +Check configured LSP servers using the `/lsp` command in an interactive session, or view your configuration files directly. + +For more information, see the [changelog](./changelog.md). + ## 📢 Feedback and Participation We're excited to have you join us early in the Copilot CLI journey.