From c6590f51caf8cc6a149cfc846740daeb62c233f7 Mon Sep 17 00:00:00 2001 From: Bruno Borges Date: Thu, 2 Apr 2026 15:20:11 -0400 Subject: [PATCH 1/9] Add lsp-setup skill for configuring LSP servers in Copilot CLI Adds a new skill that helps users install and configure Language Server Protocol servers for GitHub Copilot CLI. Includes: - Interactive workflow: detect OS, install server, write config, verify - Bundled reference with 14 languages (Java/jdtls, TypeScript, Python, Go, Rust, C/C++, C#, Ruby, PHP, Kotlin, Swift, Lua, YAML, Bash) - Per-OS install commands and ready-to-use lsp-config.json snippets - Support for both user-level and repo-level configuration Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/README.skills.md | 1 + skills/lsp-setup/SKILL.md | 69 ++++ skills/lsp-setup/references/lsp-servers.md | 424 +++++++++++++++++++++ 3 files changed, 494 insertions(+) create mode 100644 skills/lsp-setup/SKILL.md create mode 100644 skills/lsp-setup/references/lsp-servers.md diff --git a/docs/README.skills.md b/docs/README.skills.md index e3fd2987..77103397 100644 --- a/docs/README.skills.md +++ b/docs/README.skills.md @@ -178,6 +178,7 @@ See [CONTRIBUTING.md](../CONTRIBUTING.md#adding-skills) for guidelines on how to | [kotlin-mcp-server-generator](../skills/kotlin-mcp-server-generator/SKILL.md) | Generate a complete Kotlin MCP server project with proper structure, dependencies, and implementation using the official io.modelcontextprotocol:kotlin-sdk library. | None | | [kotlin-springboot](../skills/kotlin-springboot/SKILL.md) | Get best practices for developing applications with Spring Boot and Kotlin. | None | | [legacy-circuit-mockups](../skills/legacy-circuit-mockups/SKILL.md) | Generate breadboard circuit mockups and visual diagrams using HTML5 Canvas drawing techniques. Use when asked to create circuit layouts, visualize electronic component placements, draw breadboard diagrams, mockup 6502 builds, generate retro computer schematics, or design vintage electronics projects. Supports 555 timers, W65C02S microprocessors, 28C256 EEPROMs, W65C22 VIA chips, 7400-series logic gates, LEDs, resistors, capacitors, switches, buttons, crystals, and wires. | `references/28256-eeprom.md`
`references/555.md`
`references/6502.md`
`references/6522.md`
`references/6C62256.md`
`references/7400-series.md`
`references/assembly-compiler.md`
`references/assembly-language.md`
`references/basic-electronic-components.md`
`references/breadboard.md`
`references/common-breadboard-components.md`
`references/connecting-electronic-components.md`
`references/emulator-28256-eeprom.md`
`references/emulator-6502.md`
`references/emulator-6522.md`
`references/emulator-6C62256.md`
`references/emulator-lcd.md`
`references/lcd.md`
`references/minipro.md`
`references/t48eeprom-programmer.md` | +| [lsp-setup](../skills/lsp-setup/SKILL.md) | Install and configure LSP servers for any programming language to work with GitHub Copilot CLI. Detects the OS, installs the right LSP server, and writes the lsp-config.json configuration. Say "setup LSP" to start. | `references/lsp-servers.md` | | [make-repo-contribution](../skills/make-repo-contribution/SKILL.md) | All changes to code must follow the guidance documented in the repository. Before any issue is filed, branch is made, commits generated, or pull request (or PR) created, a search must be done to ensure the right steps are followed. Whenever asked to create an issue, commit messages, to push code, or create a PR, use this skill so everything is done correctly. | `assets/issue-template.md`
`assets/pr-template.md` | | [make-skill-template](../skills/make-skill-template/SKILL.md) | Create new Agent Skills for GitHub Copilot from prompts or by duplicating this template. Use when asked to "create a skill", "make a new skill", "scaffold a skill", or when building specialized AI capabilities with bundled resources. Generates SKILL.md files with proper frontmatter, directory structure, and optional scripts/references/assets folders. | None | | [markdown-to-html](../skills/markdown-to-html/SKILL.md) | Convert Markdown files to HTML similar to `marked.js`, `pandoc`, `gomarkdown/markdown`, or similar tools; or writing custom script to convert markdown to html and/or working on web template systems like `jekyll/jekyll`, `gohugoio/hugo`, or similar web templating systems that utilize markdown documents, converting them to html. Use when asked to "convert markdown to html", "transform md to html", "render markdown", "generate html from markdown", or when working with .md files and/or web a templating system that converts markdown to HTML output. Supports CLI and Node.js workflows with GFM, CommonMark, and standard Markdown flavors. | `references/basic-markdown-to-html.md`
`references/basic-markdown.md`
`references/code-blocks-to-html.md`
`references/code-blocks.md`
`references/collapsed-sections-to-html.md`
`references/collapsed-sections.md`
`references/gomarkdown.md`
`references/hugo.md`
`references/jekyll.md`
`references/marked.md`
`references/pandoc.md`
`references/tables-to-html.md`
`references/tables.md`
`references/writing-mathematical-expressions-to-html.md`
`references/writing-mathematical-expressions.md` | diff --git a/skills/lsp-setup/SKILL.md b/skills/lsp-setup/SKILL.md new file mode 100644 index 00000000..78807a4e --- /dev/null +++ b/skills/lsp-setup/SKILL.md @@ -0,0 +1,69 @@ +--- +name: lsp-setup +description: 'Install and configure LSP servers for any programming language to work with GitHub Copilot CLI. Detects the OS, installs the right LSP server, and writes the lsp-config.json configuration. Say "setup LSP" to start.' +--- + +# LSP Setup for GitHub Copilot CLI + +**UTILITY SKILL** — installs and configures Language Server Protocol servers for Copilot CLI. +USE FOR: "setup LSP", "install language server", "configure LSP for Java", "add TypeScript LSP", "enable code intelligence" +DO NOT USE FOR: general coding tasks, IDE/editor LSP configuration, non-Copilot-CLI setups + +## Workflow + +1. **Ask the language** — use `ask_user` to ask which programming language(s) the user wants LSP support for +2. **Detect the OS** — run `uname -s` (or check for Windows via `$env:OS` / `%OS%`) to determine macOS, Linux, or Windows +3. **Look up the LSP server** — read `references/lsp-servers.md` for known servers, install commands, and config snippets +4. **Ask scope** — use `ask_user` to ask whether the config should be user-level (`~/.copilot/lsp-config.json`) or repo-level (`.github/lsp.json`) +5. **Install the server** — run the appropriate install command for the detected OS +6. **Write the config** — merge the new server entry into the chosen config file (create it if missing, preserve existing entries) +7. **Verify** — confirm the LSP binary is on `$PATH` and the config file is valid JSON + +## Configuration Format + +Copilot CLI reads LSP configuration from two locations (repo-level takes precedence): + +- **User-level**: `~/.copilot/lsp-config.json` +- **Repo-level**: `.github/lsp.json` + +The JSON structure: + +```json +{ + "lspServers": { + "": { + "command": "", + "args": ["--stdio"], + "fileExtensions": { + ".": "", + ".": "" + } + } + } +} +``` + +### Key rules + +- `command` is the binary name (must be on `$PATH`) or an absolute path. +- `args` almost always includes `"--stdio"` to use standard I/O transport. +- `fileExtensions` maps each file extension (with leading dot) to a [Language ID](https://code.visualstudio.com/docs/languages/identifiers#_known-language-identifiers). +- Multiple servers can coexist in `lspServers`. +- When merging into an existing file, **never overwrite** other server entries — only add or update the target language key. + +## Behavior + +- Always use `ask_user` with `choices` when asking the user to pick a language or scope. +- If the language is not listed in `references/lsp-servers.md`, search the web for " LSP server" and guide the user through manual configuration. +- If a package manager is not available (e.g. no Homebrew on macOS), suggest alternative install methods from the reference file. +- After installation, run `which ` (or `where.exe` on Windows) to confirm the binary is accessible. +- Show the user the final config JSON before writing it. +- If the config file already exists, read it first and merge — do not clobber. + +## Verification + +After setup, tell the user: + +1. Launch `copilot` in a project with files of the configured language +2. Run `/lsp` to check the server status +3. Try code intelligence features like go-to-definition or hover diff --git a/skills/lsp-setup/references/lsp-servers.md b/skills/lsp-setup/references/lsp-servers.md new file mode 100644 index 00000000..f43a232f --- /dev/null +++ b/skills/lsp-setup/references/lsp-servers.md @@ -0,0 +1,424 @@ +# Known LSP Servers for Copilot CLI + +Reference data for the `lsp-setup` skill. Each section contains install commands per OS and a ready-to-use config snippet. + +--- + +## TypeScript / JavaScript + +**Server**: [typescript-language-server](https://github.com/typescript-language-server/typescript-language-server) + +### Install + +| OS | Command | +|---------|--------------------------------------------| +| Any | `npm install -g typescript-language-server` | + +### Config snippet + +```json +{ + "typescript": { + "command": "typescript-language-server", + "args": ["--stdio"], + "fileExtensions": { + ".ts": "typescript", + ".tsx": "typescriptreact", + ".js": "javascript", + ".jsx": "javascriptreact" + } + } +} +``` + +--- + +## Java + +**Server**: [Eclipse JDT Language Server (jdtls)](https://github.com/eclipse-jdtls/eclipse.jdt.ls) + +Requires **Java 21+** on `JAVA_HOME` or `$PATH`. + +### Install + +| OS | Command | +|---------|-----------------------------------| +| macOS | `brew install jdtls` | +| Linux | Check distro repos for `jdtls` or `eclipse.jdt.ls`; alternatively download from https://download.eclipse.org/jdtls/milestones/ | +| Windows | Download from https://download.eclipse.org/jdtls/milestones/ and add `bin/` to `PATH` | + +On macOS with Homebrew, the binary is installed as `jdtls` on `$PATH`. + +### Config snippet + +```json +{ + "java": { + "command": "jdtls", + "args": [], + "fileExtensions": { + ".java": "java" + } + } +} +``` + +> **Note**: The `jdtls` wrapper script handles `--stdio` mode internally. If using a manual install, you may need to invoke the launcher jar directly — see the [jdtls README](https://github.com/eclipse-jdtls/eclipse.jdt.ls#running-from-command-line-with-wrapper-script) for details. + +--- + +## Python + +**Server**: [pylsp (python-lsp-server)](https://github.com/python-lsp/python-lsp-server) + +### Install + +| OS | Command | +|---------|----------------------------------------| +| Any | `pip install python-lsp-server` | +| macOS | `brew install python-lsp-server` | + +### Config snippet + +```json +{ + "python": { + "command": "pylsp", + "args": [], + "fileExtensions": { + ".py": "python" + } + } +} +``` + +### Alternative: Pyright + +**Server**: [pyright](https://github.com/microsoft/pyright) (via [basedpyright](https://github.com/DetachHead/basedpyright) or [pyright](https://www.npmjs.com/package/pyright)) + +| OS | Command | +|---------|----------------------------------------------------| +| Any | `npm install -g pyright` | +| Any | `pip install basedpyright` (for basedpyright fork) | + +```json +{ + "python": { + "command": "pyright-langserver", + "args": ["--stdio"], + "fileExtensions": { + ".py": "python" + } + } +} +``` + +--- + +## Go + +**Server**: [gopls](https://github.com/golang/tools/tree/master/gopls) + +### Install + +| OS | Command | +|---------|--------------------------------------------| +| Any | `go install golang.org/x/tools/gopls@latest` | +| macOS | `brew install gopls` | + +### Config snippet + +```json +{ + "go": { + "command": "gopls", + "args": ["serve"], + "fileExtensions": { + ".go": "go" + } + } +} +``` + +--- + +## Rust + +**Server**: [rust-analyzer](https://github.com/rust-lang/rust-analyzer) + +### Install + +| OS | Command | +|---------|--------------------------------| +| Any | `rustup component add rust-analyzer` | +| macOS | `brew install rust-analyzer` | +| Linux | Distribution package or `rustup` | +| Windows | `rustup component add rust-analyzer` or download from GitHub releases | + +### Config snippet + +```json +{ + "rust": { + "command": "rust-analyzer", + "args": [], + "fileExtensions": { + ".rs": "rust" + } + } +} +``` + +--- + +## C / C++ + +**Server**: [clangd](https://clangd.llvm.org/) + +### Install + +| OS | Command | +|---------|----------------------------------------| +| macOS | `brew install llvm` (clangd included) or Xcode command line tools | +| Linux | `apt install clangd` / `dnf install clang-tools-extra` | +| Windows | Download LLVM from https://releases.llvm.org/ | + +### Config snippet + +```json +{ + "cpp": { + "command": "clangd", + "args": ["--background-index"], + "fileExtensions": { + ".c": "c", + ".h": "c", + ".cpp": "cpp", + ".cxx": "cpp", + ".cc": "cpp", + ".hpp": "cpp", + ".hxx": "cpp" + } + } +} +``` + +--- + +## C# (.NET) + +**Server**: [OmniSharp](https://github.com/OmniSharp/omnisharp-roslyn) or [csharp-ls](https://github.com/razzmatazz/csharp-language-server) + +### Install (csharp-ls) + +| OS | Command | +|---------|-------------------------------------------------| +| Any | `dotnet tool install --global csharp-ls` | + +### Config snippet + +```json +{ + "csharp": { + "command": "csharp-ls", + "args": [], + "fileExtensions": { + ".cs": "csharp" + } + } +} +``` + +--- + +## Ruby + +**Server**: [solargraph](https://github.com/castwide/solargraph) + +### Install + +| OS | Command | +|---------|---------------------------| +| Any | `gem install solargraph` | + +### Config snippet + +```json +{ + "ruby": { + "command": "solargraph", + "args": ["stdio"], + "fileExtensions": { + ".rb": "ruby", + ".rake": "ruby", + ".gemspec": "ruby" + } + } +} +``` + +--- + +## PHP + +**Server**: [intelephense](https://github.com/bmewburn/vscode-intelephense) + +### Install + +| OS | Command | +|---------|--------------------------------------------| +| Any | `npm install -g intelephense` | + +### Config snippet + +```json +{ + "php": { + "command": "intelephense", + "args": ["--stdio"], + "fileExtensions": { + ".php": "php" + } + } +} +``` + +--- + +## Kotlin + +**Server**: [kotlin-language-server](https://github.com/fwcd/kotlin-language-server) + +### Install + +| OS | Command | +|---------|---------------------------------------------------| +| macOS | `brew install kotlin-language-server` | +| Any | Download from GitHub releases and add to `PATH` | + +### Config snippet + +```json +{ + "kotlin": { + "command": "kotlin-language-server", + "args": [], + "fileExtensions": { + ".kt": "kotlin", + ".kts": "kotlin" + } + } +} +``` + +--- + +## Swift + +**Server**: [sourcekit-lsp](https://github.com/swiftlang/sourcekit-lsp) (bundled with Swift toolchain) + +### Install + +| OS | Command | +|---------|----------------------------------------------------------------| +| macOS | Included with Xcode; binary at `xcrun sourcekit-lsp` | +| Linux | Included with Swift toolchain; install from https://swift.org | + +### Config snippet + +```json +{ + "swift": { + "command": "sourcekit-lsp", + "args": [], + "fileExtensions": { + ".swift": "swift" + } + } +} +``` + +> On macOS you may need to use the full path: `/usr/bin/sourcekit-lsp` or set `command` to `xcrun` with `args: ["sourcekit-lsp"]`. + +--- + +## Lua + +**Server**: [lua-language-server](https://github.com/LuaLS/lua-language-server) + +### Install + +| OS | Command | +|---------|--------------------------------------| +| macOS | `brew install lua-language-server` | +| Linux | Download from GitHub releases | +| Windows | Download from GitHub releases | + +### Config snippet + +```json +{ + "lua": { + "command": "lua-language-server", + "args": [], + "fileExtensions": { + ".lua": "lua" + } + } +} +``` + +--- + +## YAML + +**Server**: [yaml-language-server](https://github.com/redhat-developer/yaml-language-server) + +### Install + +| OS | Command | +|---------|----------------------------------------------| +| Any | `npm install -g yaml-language-server` | + +### Config snippet + +```json +{ + "yaml": { + "command": "yaml-language-server", + "args": ["--stdio"], + "fileExtensions": { + ".yaml": "yaml", + ".yml": "yaml" + } + } +} +``` + +--- + +## Bash / Shell + +**Server**: [bash-language-server](https://github.com/bash-lsp/bash-language-server) + +### Install + +| OS | Command | +|---------|-----------------------------------------------| +| Any | `npm install -g bash-language-server` | + +### Config snippet + +```json +{ + "bash": { + "command": "bash-language-server", + "args": ["start"], + "fileExtensions": { + ".sh": "shellscript", + ".bash": "shellscript", + ".zsh": "shellscript" + } + } +} +``` From 9c7639427c79fe910b5949606b894f36f4c48590 Mon Sep 17 00:00:00 2001 From: Bruno Borges Date: Thu, 2 Apr 2026 15:35:07 -0400 Subject: [PATCH 2/9] Address review: clarify config filenames and snippet format - Update SKILL.md description to mention both config paths (user-level and repo-level) instead of only lsp-config.json - Clarify workflow step 6 with explicit file paths - Add note in references/lsp-servers.md explaining snippets are objects to insert under the lspServers key - Regenerate docs/README.skills.md with updated description Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/README.skills.md | 2 +- skills/lsp-setup/SKILL.md | 4 ++-- skills/lsp-setup/references/lsp-servers.md | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/README.skills.md b/docs/README.skills.md index 77103397..c2e904a5 100644 --- a/docs/README.skills.md +++ b/docs/README.skills.md @@ -178,7 +178,7 @@ See [CONTRIBUTING.md](../CONTRIBUTING.md#adding-skills) for guidelines on how to | [kotlin-mcp-server-generator](../skills/kotlin-mcp-server-generator/SKILL.md) | Generate a complete Kotlin MCP server project with proper structure, dependencies, and implementation using the official io.modelcontextprotocol:kotlin-sdk library. | None | | [kotlin-springboot](../skills/kotlin-springboot/SKILL.md) | Get best practices for developing applications with Spring Boot and Kotlin. | None | | [legacy-circuit-mockups](../skills/legacy-circuit-mockups/SKILL.md) | Generate breadboard circuit mockups and visual diagrams using HTML5 Canvas drawing techniques. Use when asked to create circuit layouts, visualize electronic component placements, draw breadboard diagrams, mockup 6502 builds, generate retro computer schematics, or design vintage electronics projects. Supports 555 timers, W65C02S microprocessors, 28C256 EEPROMs, W65C22 VIA chips, 7400-series logic gates, LEDs, resistors, capacitors, switches, buttons, crystals, and wires. | `references/28256-eeprom.md`
`references/555.md`
`references/6502.md`
`references/6522.md`
`references/6C62256.md`
`references/7400-series.md`
`references/assembly-compiler.md`
`references/assembly-language.md`
`references/basic-electronic-components.md`
`references/breadboard.md`
`references/common-breadboard-components.md`
`references/connecting-electronic-components.md`
`references/emulator-28256-eeprom.md`
`references/emulator-6502.md`
`references/emulator-6522.md`
`references/emulator-6C62256.md`
`references/emulator-lcd.md`
`references/lcd.md`
`references/minipro.md`
`references/t48eeprom-programmer.md` | -| [lsp-setup](../skills/lsp-setup/SKILL.md) | Install and configure LSP servers for any programming language to work with GitHub Copilot CLI. Detects the OS, installs the right LSP server, and writes the lsp-config.json configuration. Say "setup LSP" to start. | `references/lsp-servers.md` | +| [lsp-setup](../skills/lsp-setup/SKILL.md) | Install and configure LSP servers for any programming language to work with GitHub Copilot CLI. Detects the OS, installs the right LSP server, and generates the LSP configuration (user-level or repo-level). Say "setup LSP" to start. | `references/lsp-servers.md` | | [make-repo-contribution](../skills/make-repo-contribution/SKILL.md) | All changes to code must follow the guidance documented in the repository. Before any issue is filed, branch is made, commits generated, or pull request (or PR) created, a search must be done to ensure the right steps are followed. Whenever asked to create an issue, commit messages, to push code, or create a PR, use this skill so everything is done correctly. | `assets/issue-template.md`
`assets/pr-template.md` | | [make-skill-template](../skills/make-skill-template/SKILL.md) | Create new Agent Skills for GitHub Copilot from prompts or by duplicating this template. Use when asked to "create a skill", "make a new skill", "scaffold a skill", or when building specialized AI capabilities with bundled resources. Generates SKILL.md files with proper frontmatter, directory structure, and optional scripts/references/assets folders. | None | | [markdown-to-html](../skills/markdown-to-html/SKILL.md) | Convert Markdown files to HTML similar to `marked.js`, `pandoc`, `gomarkdown/markdown`, or similar tools; or writing custom script to convert markdown to html and/or working on web template systems like `jekyll/jekyll`, `gohugoio/hugo`, or similar web templating systems that utilize markdown documents, converting them to html. Use when asked to "convert markdown to html", "transform md to html", "render markdown", "generate html from markdown", or when working with .md files and/or web a templating system that converts markdown to HTML output. Supports CLI and Node.js workflows with GFM, CommonMark, and standard Markdown flavors. | `references/basic-markdown-to-html.md`
`references/basic-markdown.md`
`references/code-blocks-to-html.md`
`references/code-blocks.md`
`references/collapsed-sections-to-html.md`
`references/collapsed-sections.md`
`references/gomarkdown.md`
`references/hugo.md`
`references/jekyll.md`
`references/marked.md`
`references/pandoc.md`
`references/tables-to-html.md`
`references/tables.md`
`references/writing-mathematical-expressions-to-html.md`
`references/writing-mathematical-expressions.md` | diff --git a/skills/lsp-setup/SKILL.md b/skills/lsp-setup/SKILL.md index 78807a4e..cfbcc08c 100644 --- a/skills/lsp-setup/SKILL.md +++ b/skills/lsp-setup/SKILL.md @@ -1,6 +1,6 @@ --- name: lsp-setup -description: 'Install and configure LSP servers for any programming language to work with GitHub Copilot CLI. Detects the OS, installs the right LSP server, and writes the lsp-config.json configuration. Say "setup LSP" to start.' +description: 'Install and configure LSP servers for any programming language to work with GitHub Copilot CLI. Detects the OS, installs the right LSP server, and generates the LSP configuration (user-level or repo-level). Say "setup LSP" to start.' --- # LSP Setup for GitHub Copilot CLI @@ -16,7 +16,7 @@ DO NOT USE FOR: general coding tasks, IDE/editor LSP configuration, non-Copilot- 3. **Look up the LSP server** — read `references/lsp-servers.md` for known servers, install commands, and config snippets 4. **Ask scope** — use `ask_user` to ask whether the config should be user-level (`~/.copilot/lsp-config.json`) or repo-level (`.github/lsp.json`) 5. **Install the server** — run the appropriate install command for the detected OS -6. **Write the config** — merge the new server entry into the chosen config file (create it if missing, preserve existing entries) +6. **Write the config** — merge the new server entry into the chosen config file (`~/.copilot/lsp-config.json` for user-level, `.github/lsp.json` for repo-level); create it if missing, preserve existing entries 7. **Verify** — confirm the LSP binary is on `$PATH` and the config file is valid JSON ## Configuration Format diff --git a/skills/lsp-setup/references/lsp-servers.md b/skills/lsp-setup/references/lsp-servers.md index f43a232f..a24b73fa 100644 --- a/skills/lsp-setup/references/lsp-servers.md +++ b/skills/lsp-setup/references/lsp-servers.md @@ -2,6 +2,8 @@ Reference data for the `lsp-setup` skill. Each section contains install commands per OS and a ready-to-use config snippet. +> **Config snippet format**: Each snippet below shows the object to insert as a value under the top-level `lspServers` key. A complete config file looks like: `{ "lspServers": { } }`. When adding multiple languages, merge their snippets as sibling keys under `lspServers`. + --- ## TypeScript / JavaScript From 3919a0031564d659afd164c503d2117c614cb7e5 Mon Sep 17 00:00:00 2001 From: Bruno Borges Date: Thu, 2 Apr 2026 16:16:39 -0400 Subject: [PATCH 3/9] Update skills/lsp-setup/references/lsp-servers.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- skills/lsp-setup/references/lsp-servers.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/skills/lsp-setup/references/lsp-servers.md b/skills/lsp-setup/references/lsp-servers.md index a24b73fa..26411ac6 100644 --- a/skills/lsp-setup/references/lsp-servers.md +++ b/skills/lsp-setup/references/lsp-servers.md @@ -12,9 +12,9 @@ Reference data for the `lsp-setup` skill. Each section contains install commands ### Install -| OS | Command | -|---------|--------------------------------------------| -| Any | `npm install -g typescript-language-server` | +| OS | Command | +|---------|-------------------------------------------------------| +| Any | `npm install -g typescript typescript-language-server` | ### Config snippet From 767e165d697a5d04f4c35ce21eb734a4805e77f4 Mon Sep 17 00:00:00 2001 From: Bruno Borges Date: Thu, 9 Apr 2026 12:28:56 -0400 Subject: [PATCH 4/9] fix: use roslyn-language-server for .NET LSP config Replace csharp-ls/OmniSharp with roslyn-language-server in the .NET section, matching the official dotnet/skills reference configuration. Addresses review feedback from @aaronpowell in PR #1272. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- skills/lsp-setup/references/lsp-servers.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/skills/lsp-setup/references/lsp-servers.md b/skills/lsp-setup/references/lsp-servers.md index 26411ac6..44caa696 100644 --- a/skills/lsp-setup/references/lsp-servers.md +++ b/skills/lsp-setup/references/lsp-servers.md @@ -209,21 +209,21 @@ On macOS with Homebrew, the binary is installed as `jdtls` on `$PATH`. ## C# (.NET) -**Server**: [OmniSharp](https://github.com/OmniSharp/omnisharp-roslyn) or [csharp-ls](https://github.com/razzmatazz/csharp-language-server) +**Server**: [Roslyn Language Server](https://github.com/dotnet/roslyn) (via `dotnet dnx`) -### Install (csharp-ls) +### Install -| OS | Command | -|---------|-------------------------------------------------| -| Any | `dotnet tool install --global csharp-ls` | +| OS | Command | +|---------|----------------------------------------------------------------| +| Any | Requires the [.NET SDK](https://dot.net/download) installed | ### Config snippet ```json { "csharp": { - "command": "csharp-ls", - "args": [], + "command": "dotnet", + "args": ["dnx", "roslyn-language-server", "--yes", "--prerelease", "--", "--stdio", "--autoLoadProjects"], "fileExtensions": { ".cs": "csharp" } From a000a83efe0b509319034ac90af9a3a95f1e777c Mon Sep 17 00:00:00 2001 From: Bruno Borges Date: Thu, 9 Apr 2026 14:14:43 -0400 Subject: [PATCH 5/9] Use pyright as single Python LSP recommendation Replace pylsp primary + pyright alternative with a single pyright recommendation for Python. Go already correctly recommends gopls. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- skills/lsp-setup/references/lsp-servers.md | 31 ++++------------------ 1 file changed, 5 insertions(+), 26 deletions(-) diff --git a/skills/lsp-setup/references/lsp-servers.md b/skills/lsp-setup/references/lsp-servers.md index 44caa696..279311ba 100644 --- a/skills/lsp-setup/references/lsp-servers.md +++ b/skills/lsp-setup/references/lsp-servers.md @@ -71,38 +71,17 @@ On macOS with Homebrew, the binary is installed as `jdtls` on `$PATH`. ## Python -**Server**: [pylsp (python-lsp-server)](https://github.com/python-lsp/python-lsp-server) +**Server**: [pyright](https://github.com/microsoft/pyright) ### Install -| OS | Command | -|---------|----------------------------------------| -| Any | `pip install python-lsp-server` | -| macOS | `brew install python-lsp-server` | +| OS | Command | +|---------|----------------------------| +| Any | `npm install -g pyright` | +| Any | `pip install pyright` | ### Config snippet -```json -{ - "python": { - "command": "pylsp", - "args": [], - "fileExtensions": { - ".py": "python" - } - } -} -``` - -### Alternative: Pyright - -**Server**: [pyright](https://github.com/microsoft/pyright) (via [basedpyright](https://github.com/DetachHead/basedpyright) or [pyright](https://www.npmjs.com/package/pyright)) - -| OS | Command | -|---------|----------------------------------------------------| -| Any | `npm install -g pyright` | -| Any | `pip install basedpyright` (for basedpyright fork) | - ```json { "python": { From 468b65fcdeabd38ed5a3e846a92d82c02553982f Mon Sep 17 00:00:00 2001 From: Bruno Borges Date: Thu, 9 Apr 2026 14:27:56 -0400 Subject: [PATCH 6/9] Improve lsp-setup skill description for broader triggering Rewrite description to emphasize code intelligence capabilities (go-to-definition, find-references, hover) so the coding agent triggers the skill when it needs deeper code understanding, while still matching explicit LSP setup/configuration requests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- skills/lsp-setup/SKILL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skills/lsp-setup/SKILL.md b/skills/lsp-setup/SKILL.md index cfbcc08c..a2fd8929 100644 --- a/skills/lsp-setup/SKILL.md +++ b/skills/lsp-setup/SKILL.md @@ -1,12 +1,12 @@ --- name: lsp-setup -description: 'Install and configure LSP servers for any programming language to work with GitHub Copilot CLI. Detects the OS, installs the right LSP server, and generates the LSP configuration (user-level or repo-level). Say "setup LSP" to start.' +description: 'Enable code intelligence (go-to-definition, find-references, hover, type info) for any programming language by installing and configuring an LSP server for Copilot CLI. Detects the OS, installs the right server, and generates the JSON configuration (user-level or repo-level). Use when you need deeper code understanding and no LSP server is configured, or when the user asks to set up, install, or configure an LSP server.' --- # LSP Setup for GitHub Copilot CLI **UTILITY SKILL** — installs and configures Language Server Protocol servers for Copilot CLI. -USE FOR: "setup LSP", "install language server", "configure LSP for Java", "add TypeScript LSP", "enable code intelligence" +USE FOR: "setup LSP", "install language server", "configure LSP for Java", "add TypeScript LSP", "enable code intelligence", "I need go-to-definition", "find references not working", "need better code understanding" DO NOT USE FOR: general coding tasks, IDE/editor LSP configuration, non-Copilot-CLI setups ## Workflow From 5e5cffd12590120fb314d6d89b3e571aa95c1f4b Mon Sep 17 00:00:00 2001 From: Bruno Borges Date: Thu, 9 Apr 2026 14:33:33 -0400 Subject: [PATCH 7/9] Regenerate README.skills.md with updated lsp-setup description Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/README.skills.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.skills.md b/docs/README.skills.md index f7d4dec5..60e7332d 100644 --- a/docs/README.skills.md +++ b/docs/README.skills.md @@ -183,7 +183,7 @@ See [CONTRIBUTING.md](../CONTRIBUTING.md#adding-skills) for guidelines on how to | [kotlin-mcp-server-generator](../skills/kotlin-mcp-server-generator/SKILL.md) | Generate a complete Kotlin MCP server project with proper structure, dependencies, and implementation using the official io.modelcontextprotocol:kotlin-sdk library. | None | | [kotlin-springboot](../skills/kotlin-springboot/SKILL.md) | Get best practices for developing applications with Spring Boot and Kotlin. | None | | [legacy-circuit-mockups](../skills/legacy-circuit-mockups/SKILL.md) | Generate breadboard circuit mockups and visual diagrams using HTML5 Canvas drawing techniques. Use when asked to create circuit layouts, visualize electronic component placements, draw breadboard diagrams, mockup 6502 builds, generate retro computer schematics, or design vintage electronics projects. Supports 555 timers, W65C02S microprocessors, 28C256 EEPROMs, W65C22 VIA chips, 7400-series logic gates, LEDs, resistors, capacitors, switches, buttons, crystals, and wires. | `references/28256-eeprom.md`
`references/555.md`
`references/6502.md`
`references/6522.md`
`references/6C62256.md`
`references/7400-series.md`
`references/assembly-compiler.md`
`references/assembly-language.md`
`references/basic-electronic-components.md`
`references/breadboard.md`
`references/common-breadboard-components.md`
`references/connecting-electronic-components.md`
`references/emulator-28256-eeprom.md`
`references/emulator-6502.md`
`references/emulator-6522.md`
`references/emulator-6C62256.md`
`references/emulator-lcd.md`
`references/lcd.md`
`references/minipro.md`
`references/t48eeprom-programmer.md` | -| [lsp-setup](../skills/lsp-setup/SKILL.md) | Install and configure LSP servers for any programming language to work with GitHub Copilot CLI. Detects the OS, installs the right LSP server, and generates the LSP configuration (user-level or repo-level). Say "setup LSP" to start. | `references/lsp-servers.md` | +| [lsp-setup](../skills/lsp-setup/SKILL.md) | Enable code intelligence (go-to-definition, find-references, hover, type info) for any programming language by installing and configuring an LSP server for Copilot CLI. Detects the OS, installs the right server, and generates the JSON configuration (user-level or repo-level). Use when you need deeper code understanding and no LSP server is configured, or when the user asks to set up, install, or configure an LSP server. | `references/lsp-servers.md` | | [make-repo-contribution](../skills/make-repo-contribution/SKILL.md) | All changes to code must follow the guidance documented in the repository. Before any issue is filed, branch is made, commits generated, or pull request (or PR) created, a search must be done to ensure the right steps are followed. Whenever asked to create an issue, commit messages, to push code, or create a PR, use this skill so everything is done correctly. | `assets/issue-template.md`
`assets/pr-template.md` | | [make-skill-template](../skills/make-skill-template/SKILL.md) | Create new Agent Skills for GitHub Copilot from prompts or by duplicating this template. Use when asked to "create a skill", "make a new skill", "scaffold a skill", or when building specialized AI capabilities with bundled resources. Generates SKILL.md files with proper frontmatter, directory structure, and optional scripts/references/assets folders. | None | | [markdown-to-html](../skills/markdown-to-html/SKILL.md) | Convert Markdown files to HTML similar to `marked.js`, `pandoc`, `gomarkdown/markdown`, or similar tools; or writing custom script to convert markdown to html and/or working on web template systems like `jekyll/jekyll`, `gohugoio/hugo`, or similar web templating systems that utilize markdown documents, converting them to html. Use when asked to "convert markdown to html", "transform md to html", "render markdown", "generate html from markdown", or when working with .md files and/or web a templating system that converts markdown to HTML output. Supports CLI and Node.js workflows with GFM, CommonMark, and standard Markdown flavors. | `references/basic-markdown-to-html.md`
`references/basic-markdown.md`
`references/code-blocks-to-html.md`
`references/code-blocks.md`
`references/collapsed-sections-to-html.md`
`references/collapsed-sections.md`
`references/gomarkdown.md`
`references/hugo.md`
`references/jekyll.md`
`references/marked.md`
`references/pandoc.md`
`references/tables-to-html.md`
`references/tables.md`
`references/writing-mathematical-expressions-to-html.md`
`references/writing-mathematical-expressions.md` | From 7e12d61ec141498ee82a06eb57db470c1208b270 Mon Sep 17 00:00:00 2001 From: Bruno Borges Date: Thu, 9 Apr 2026 14:36:53 -0400 Subject: [PATCH 8/9] Update skills/lsp-setup/SKILL.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- skills/lsp-setup/SKILL.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/skills/lsp-setup/SKILL.md b/skills/lsp-setup/SKILL.md index a2fd8929..41331d6a 100644 --- a/skills/lsp-setup/SKILL.md +++ b/skills/lsp-setup/SKILL.md @@ -14,17 +14,17 @@ DO NOT USE FOR: general coding tasks, IDE/editor LSP configuration, non-Copilot- 1. **Ask the language** — use `ask_user` to ask which programming language(s) the user wants LSP support for 2. **Detect the OS** — run `uname -s` (or check for Windows via `$env:OS` / `%OS%`) to determine macOS, Linux, or Windows 3. **Look up the LSP server** — read `references/lsp-servers.md` for known servers, install commands, and config snippets -4. **Ask scope** — use `ask_user` to ask whether the config should be user-level (`~/.copilot/lsp-config.json`) or repo-level (`.github/lsp.json`) +4. **Ask scope** — use `ask_user` to ask whether the config should be user-level (`~/.copilot/lsp-config.json`) or repo-level (`lsp.json` at the repo root or `.github/lsp.json`) 5. **Install the server** — run the appropriate install command for the detected OS -6. **Write the config** — merge the new server entry into the chosen config file (`~/.copilot/lsp-config.json` for user-level, `.github/lsp.json` for repo-level); create it if missing, preserve existing entries +6. **Write the config** — merge the new server entry into the chosen config file (`~/.copilot/lsp-config.json` for user-level; `lsp.json` or `.github/lsp.json` for repo-level). If a repo-level config already exists, keep using that location; otherwise ask the user which repo-level location they prefer. Create the file if missing and preserve existing entries. 7. **Verify** — confirm the LSP binary is on `$PATH` and the config file is valid JSON ## Configuration Format -Copilot CLI reads LSP configuration from two locations (repo-level takes precedence): +Copilot CLI reads LSP configuration from user-level or repo-level locations, and repo-level config takes precedence over user-level config: - **User-level**: `~/.copilot/lsp-config.json` -- **Repo-level**: `.github/lsp.json` +- **Repo-level**: `lsp.json` (repo root) or `.github/lsp.json` The JSON structure: From 9d8c98ea512809c53df1f156d079622225369048 Mon Sep 17 00:00:00 2001 From: Bruno Borges Date: Thu, 9 Apr 2026 14:54:51 -0400 Subject: [PATCH 9/9] Instruct user to /exit and restart after LSP setup LSP servers are only loaded on Copilot CLI startup, so the user must exit and re-launch for the new configuration to take effect. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- skills/lsp-setup/SKILL.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/skills/lsp-setup/SKILL.md b/skills/lsp-setup/SKILL.md index 41331d6a..3a0a5159 100644 --- a/skills/lsp-setup/SKILL.md +++ b/skills/lsp-setup/SKILL.md @@ -64,6 +64,7 @@ The JSON structure: After setup, tell the user: -1. Launch `copilot` in a project with files of the configured language -2. Run `/lsp` to check the server status -3. Try code intelligence features like go-to-definition or hover +1. Type `/exit` to quit Copilot CLI — this is **required** so the new LSP configuration is loaded on next launch +2. Re-launch `copilot` in a project with files of the configured language +3. Run `/lsp` to check the server status +4. Try code intelligence features like go-to-definition or hover