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", "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
ask_user to ask which programming language(s) the user wants LSP support foruname -s (or check for Windows via $env:OS / %OS%) to determine macOS, Linux, or Windowsreferences/lsp-servers.md for known servers, install commands, and config snippetsask_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)~/.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.$PATH and the config file is valid JSONCopilot CLI reads LSP configuration from user-level or repo-level locations, and repo-level config takes precedence over user-level config:
~/.copilot/lsp-config.json
lsp.json (repo root) or .github/lsp.json
The JSON structure:
{
"lspServers": {
"<server-key>": {
"command": "<binary>",
"args": ["--stdio"],
"fileExtensions": {
".<ext>": "<languageId>",
".<ext2>": "<languageId>"
}
}
}
}
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.lspServers.ask_user with choices when asking the user to pick a language or scope.references/lsp-servers.md, search the web for "which <binary> (or where.exe on Windows) to confirm the binary is accessible.After setup, tell the user:
/exit to quit Copilot CLI — this is required so the new LSP configuration is loaded on next launchcopilot in a project with files of the configured language/lsp to check the server status