C++ code intelligence for GitHub Copilot CLI in public preview
The Microsoft C++ Language Server is now available in public preview for the Copilot CLI. Powered by the same IntelliSense engine used in Visual Studio and VS Code, it extends precise, semantic C++ code intelligence beyond the IDE to the command line.
Why this matters
C++ is uniquely difficult for tools to reason about. Complex include hierarchies, macros, templates, and build-system-dependent configurations mean text search alone gives incomplete results. The C++ Language Server provides Copilot with precise semantic data (i.e., symbol definitions, references, call hierarchies, and type information) to complement grep-style search.
For example, with the language server, Copilot uses workspace symbol search and go-to-definition to find and understand relevant code directly. Without it, Copilot falls back to iterative grep searches, which can return irrelevant results across the codebase.
Getting started
The Microsoft C++ Language Server is available in preview as an npm package. Check out the quick start guide in the README of our corresponding issue-only GitHub repository to get started. An active GitHub Copilot subscription is required.
The Microsoft C++ Language Server requires:
- Authenticating with the GitHub Copilot CLI
- Creating a
compile_commands.jsonfor your project - Configuring your project for use with the CLI
Our issue-only GitHub repository contains a skill that automatically handles the second and third requirement for CMake projects, as well as instructions to walk through the process yourself.
For MSBuild users, we’ve created a sample application to help extract compile_commands.json from C++ MSBuild projects. Integrated MSBuild support is planned for a future release.
Tip: For best results, append “Use the C++ LSP” to your queries or create a custom instructions file to prefer the C++ LSP.
Feedback
To report a problem or suggest an improvement, open an issue in our GitHub repository.