{"slug": "streamline-c-code-intelligence-setup-in-copilot-cli", "title": "Streamline C++ Code Intelligence Setup in Copilot CLI", "summary": "Microsoft released a setup LSP skill for the C++ language server plugin in Copilot CLI, enabling developers to generate compile_commands.json for CMake, MSBuild, and custom build systems. The skill simplifies configuring IDE-style semantic intelligence for code navigation, diagnostics, and code changes outside the IDE.", "body_md": "C++ developers can now bring IDE-style semantic intelligence into Copilot CLI with less setup. The [C++ language server plugin](https://github.com/microsoft/cpp-language-server/) supports richer code navigation, diagnostics, symbol understanding, and code changes by using the same build context your compiler does.\n\nThat build context usually comes from a `compile_commands.json`\n\nfile, which tells the language server how each source file is compiled. Instead of manually wiring that file together, the C++ language server plugin now provides a [setup LSP skill](https://github.com/microsoft/cpp-language-server/blob/main/plugins/cpp-language-server/skills/generate-compile-commands/SKILL.md) that can help generate or refresh compile commands for common project types, including CMake and MSBuild. For custom build systems, teams can still provide their own` compile_commands.json`\n\nfile or [create a project-specific skill](https://github.com/microsoft/cpp-language-server/blob/main/AUTHORING_EXTRACTOR_SKILL.md) that captures their build setup once and makes it repeatable.\n\nTo get started with the C++ language server for Copilot CLI, please download via the [Copilot Plugins](https://github.com/github/copilot-plugins) marketplace and follow [the Quick Start guide in the repo](https://github.com/microsoft/cpp-language-server/#-quick-start) to accept EULA and configure` compile_commands.json`\n\n:\n\n```\n/plugin install cpp-language-server@copilot-plugins\n```\n\nWhether your project uses CMake, MSBuild, or a custom build pipeline, the goal is the same: make it easier for you to configure the C++ language server for Copilot CLI so Copilot can provide better navigation, diagnostics, explanations, and code changes, even when you’re outside the IDE.\n\n[[Fill out form]](https://forms.office.com/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbR3y0EFonU1lFoDzxL3GpYptUNDg0MzRWVkUyU0wxOU5BNEZXTkdFTFA3NC4u)\n\n### Configuring the language server\n\nThe language server needs a `compile_commands.json`\n\nfile to understand your project. If you do not already have one generated via your build, you can utilize the skill to generate this for you.\n\nTo generate compile commands, type “regenerate compile commands” or “load project” in Copilot CLI, based on your desired configuration and platform (if necessary).\n\nSee “Recommended configuration path by project type” section below for suggestions based on your project build configuration.\n\nNote: If your configuration changes, the skill should be re-invoked to regenerate your `compile_commands.json`\n\nto keep the LSP server in sync. The LSP server will automatically watch for changes to the `compile_commands.json`\n\nfile.\n\n### Recommended configuration path by project type\n\n#### CMake projects\n\nFor CMake-based projects, if you don’t have a `compile_commands.json`\n\nalready generated from your CMake builds. the recommended path is to use the skill to onboard the project to generate `compile_commands.json`\n\n. You can also generate a `compile_commands.json`\n\nby passing\n\nset to “[-DCMAKE_EXPORT_COMPILE_COMMANDS](https://cmake.org/cmake/help/latest/variable/CMAKE_EXPORT_COMPILE_COMMANDS.html)`TRUE`\n\n” when configuring CMake.\n\nCMake has native support for compile command generation and the skill can help configure the project, so the language server has the compilation database it needs.\n\n#### MSBuild projects\n\nFor MSBuild-based projects, users have two options.\n\nFor teams that want a guided setup, the skill can still help onboard the project by producing the configuration needed for the language server.\n\nHowever, if you’d like to generate your own compile commands, you can refer to [this sample application](https://github.com/microsoft/msbuild-extractor-sample) for an example of how to generate compile_commands.json from MSBuild projects. While the sample application is designed to work out-of-the-box for many projects, it may require adaptation for complex projects.\n\n#### Custom build systems\n\nCustom builds often use hermetic, vendored, or wrapper-based toolchains that standard discovery cannot always detect.\n\nFor teams with custom toolchains, a project-specific [skill](https://docs.github.com/en/copilot/concepts/agents/about-agent-skills) can capture the setup once and make it repeatable. The [detailed guidance provided in the cpp-language-server repo](https://github.com/microsoft/cpp-language-server/blob/main/README.md) covers when custom configuration is needed, what settings to pin, and how to structure a skill so Copilot can regenerate compile commands reliably. It is especially useful for repositories where the default extractor produces incomplete output, picks up the wrong toolchain, or needs to run through a repo-provided build environment.\n\n### Getting started with the Microsoft C++ language server\n\nThe Microsoft C++ language server is available as a Copilot CLI plugin and runs on Windows, Linux, and macOS. An [active GitHub Copilot subscription](https://github.com/features/copilot/plans?ref_cta=See+pricing+and+plans&ref_loc=hero&ref_page=%2Ffeatures_copilot_copilot_ai_code_editor&cft=copilot_li.features_copilot) is required.\n\nTo get started, install the C++ language server plugin from the Copilot Plugins marketplace and follow [the Quick Start guide](https://github.com/microsoft/cpp-language-server/#-quick-start):\n\n```\n/plugin install cpp-language-server@copilot-plugins\n```\n\nThe Microsoft C++ language server requires a small amount of setup so it can understand your project the same way your compiler does:\n\n- Authenticate with GitHub Copilot CLI\n- Provide or generate a\n`compile_commands.json`\n\nfile for your project\n\n### Share your feedback\n\nLet us know your feedback and if there’s anything else you’d like to see. Help us improve the Microsoft C++ server for Copilot CLI by filling out this short survey: [[Fill out form]](https://forms.office.com/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbR3y0EFonU1lFoDzxL3GpYptUNDg0MzRWVkUyU0wxOU5BNEZXTkdFTFA3NC4u).\n\nTo report a problem or suggest an improvement, [open an issue](https://github.com/microsoft/cpp-language-server/#-reporting-feedback) in our GitHub repo.", "url": "https://wpnews.pro/news/streamline-c-code-intelligence-setup-in-copilot-cli", "canonical_source": "https://devblogs.microsoft.com/cppblog/streamline-c-code-intelligence-setup-in-copilot-cli/", "published_at": "2026-06-28 11:06:34+00:00", "updated_at": "2026-06-28 11:35:02.445738+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools"], "entities": ["Microsoft", "GitHub", "Copilot CLI", "C++ language server", "CMake", "MSBuild"], "alternates": {"html": "https://wpnews.pro/news/streamline-c-code-intelligence-setup-in-copilot-cli", "markdown": "https://wpnews.pro/news/streamline-c-code-intelligence-setup-in-copilot-cli.md", "text": "https://wpnews.pro/news/streamline-c-code-intelligence-setup-in-copilot-cli.txt", "jsonld": "https://wpnews.pro/news/streamline-c-code-intelligence-setup-in-copilot-cli.jsonld"}}