From ec3b4c6111b9a548790bc1e62e70e7c938d80466 Mon Sep 17 00:00:00 2001 From: RameshReddy Adutla Date: Sat, 7 Feb 2026 21:00:47 +0000 Subject: [PATCH 1/3] docs: add Java and Python LSP configuration examples to README MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The LSP section only showed TypeScript configuration. Add examples for Java (jdtls) and Python (pylsp) — two of the most widely used languages on GitHub — including installation instructions, individual configs, and a combined multi-language configuration example. --- README.md | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 81 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 28050a4..3b33392 100644 --- a/README.md +++ b/README.md @@ -141,12 +141,26 @@ GitHub Copilot CLI supports Language Server Protocol (LSP) for enhanced code int ### Installing Language Servers -Copilot CLI does not bundle LSP servers. You need to install them separately. For example, to set up TypeScript support: +Copilot CLI does not bundle LSP servers. You need to install them separately: +**TypeScript/JavaScript:** ```bash npm install -g typescript-language-server ``` +**Java** (requires JDK 17+): +```bash +# macOS (Homebrew) +brew install jdtls + +# Or download from https://github.com/eclipse-jdtls/eclipse.jdt.ls +``` + +**Python:** +```bash +pip install python-lsp-server +``` + For other languages, install the corresponding LSP server and configure it following the same pattern shown below. ### Configuring LSP Servers @@ -159,7 +173,58 @@ Edit `~/.copilot/lsp-config.json` **Repository-level configuration** (applies to specific project): Create `.github/lsp.json` in your repository root -Example configuration: +#### TypeScript + +```json +{ + "lspServers": { + "typescript": { + "command": "typescript-language-server", + "args": ["--stdio"], + "fileExtensions": { + ".ts": "typescript", + ".tsx": "typescript" + } + } + } +} +``` + +#### Java + +```json +{ + "lspServers": { + "java": { + "command": "jdtls", + "args": [], + "fileExtensions": { + ".java": "java" + } + } + } +} +``` + +#### Python + +```json +{ + "lspServers": { + "python": { + "command": "pylsp", + "args": [], + "fileExtensions": { + ".py": "python" + } + } + } +} +``` + +#### Multiple languages + +Combine configurations to support multiple languages in one file: ```json { @@ -171,6 +236,20 @@ Example configuration: ".ts": "typescript", ".tsx": "typescript" } + }, + "java": { + "command": "jdtls", + "args": [], + "fileExtensions": { + ".java": "java" + } + }, + "python": { + "command": "pylsp", + "args": [], + "fileExtensions": { + ".py": "python" + } } } } From e3bdcb8d4f1914dcc6f571dcccbe7fc1f102917f Mon Sep 17 00:00:00 2001 From: Ramesh Reddy Adutla <134313151+rameshreddy-adutla@users.noreply.github.com> Date: Sun, 8 Feb 2026 00:16:07 +0000 Subject: [PATCH 2/3] Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3b33392..2abd4ff 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,7 @@ Copilot CLI does not bundle LSP servers. You need to install them separately: **TypeScript/JavaScript:** ```bash -npm install -g typescript-language-server +npm install -g typescript typescript-language-server ``` **Java** (requires JDK 17+): From c4c8a8140bf3d7c2a4e94ca0defd00405a214fb4 Mon Sep 17 00:00:00 2001 From: Ramesh Reddy Adutla <134313151+rameshreddy-adutla@users.noreply.github.com> Date: Sun, 8 Feb 2026 00:16:27 +0000 Subject: [PATCH 3/3] Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2abd4ff..330db68 100644 --- a/README.md +++ b/README.md @@ -239,7 +239,7 @@ Combine configurations to support multiple languages in one file: }, "java": { "command": "jdtls", - "args": [], + "args": ["-data", "/path/to/java-workspace"], "fileExtensions": { ".java": "java" }