Copilot CLI のための新 C++ ランゲージサーバー設定スキル
Microsoft は Copilot CLI のプラグイン市場に C++ ランタイムサーバーを公開し、CMake や MSBuild プロジェクトの自動設定機能により、開発者が手動で compile_commands.json を生成する手間を大幅に削減した。
キーポイント
Copilot CLI プラグインとしての公式展開
従来の npm ベースから Copilot Plugins マーケットプレイス経由での直接インストールが可能となり、Windows、Linux、macOS におけるバージョン管理とセットアップが簡素化された。
自動設定スキルの実装
"regenerate compile commands" や "load project" という自然言語コマンドで、プロジェクトタイプに応じた compile_commands.json の生成・更新を自動化する機能が追加された。
ビルドシステム別対応戦略
CMake にはネイティブサポートを活用し、MSBuild にはガイダンス付きセットアップまたはサンプル抽出アプリを提供し、カスタムビルドシステムにはチーム固有のスキル作成を推奨している。
リアルタイム監視機能
言語サーバーが compile_commands.json の変更を自動的に監視するため、ファイル更新後に IDE やツールを再起動する必要がなくなった。
インストールと初期設定
/plugin install cpp-language-server@copilot-plugins コマンドでプラグインをインストールし、EULA に同意する必要があります。
プロジェクト構成の同期
「regenerate compile commands」または「load project」と指示することでプロジェクトを設定でき、ビルド設定の変更時に再実行して言語サーバーを同期させます。
影響分析・編集コメントを表示
影響分析
この発表は、C++ 開発者が長年直面してきた「環境構築の煩雑さ」という課題を、AI エージェントによる自動化で解決する重要な一歩です。特に、コンパイラの視点を正確に反映させるためのデータベース生成プロセスが自然言語操作で完結することは、大規模な C++ プロジェクトにおける開発フローの標準化と効率化に直結します。
編集コメント
C++ エコシステムにおける AI ツールの成熟度が示されたニュースであり、開発者が IDE の設定に費やす時間を減らし、本質的なコーディングに集中できる環境が整いつつあります。
Microsoft C++ Language Server が Copilot Plugins マーケットプレイスでプラグインとして利用可能になりました。この機能には、プロジェクト設定を自動化し、言語サーバーがコードを理解するために必要な compile_commands.json ファイルの生成と維持を容易にする新しいビルトインセットアップスキルが含まれています。
なぜこれが重要なのか
C++ 言語サーバーは、正確なセマンティックインテリジェンス(つまり、コンパイラが実際にコードをどのように認識しているかを反映したシンボルナビゲーション、診断、およびコード変更)を提供するために compile_commands.json ファイルに依存しています。従来、このファイルの作成にはビルドシステムごとに異なる手動手順が必要でした。新しいセットアップスキルは、CMake および MSBuild プロジェクトに対してこれを自動的に処理し、カスタムビルドシステム向けの反復可能なパターンも提供します。
新機能
Copilot Plugins マーケットプレイス経由で利用可能
C++ 言語サーバーは、Copilot CLI プラグインとして直接インストールできるようになりました:
/plugin install cpp-language-server@copilot-plugins
これは以前の npm ベースのインストールを置き換え、Windows、Linux、macOS において最新リリースへの対応と更新を簡素化します。
compile commands の生成スキル
新しい「compile commands の生成」スキルを使用すると、Copilot CLI から直接 compile_commands.json を生成または更新できます。単に「regenerate compile commands」または「load project」と発言するだけで、プロジェクトタイプとプラットフォームに基づいてコンパイルデータベースが設定されます。
言語サーバーは compile_commands.json の変更を自動的に監視するため、再起動せずに更新が即座に反映されます。
プロジェクトタイプ別の推奨設定
CMake プロジェクト
すでに CMake ビルドから生成された compile_commands.json が存在しない場合、このスキルを使用してファイルを生成することが推奨されます。あるいは、CMake を構成する際に -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE パラメータを指定して、ビルドプロセスから直接ファイルを作成することも可能です。
CMake にはネイティブでコマンド生成のサポートが備わっており、本スキルは言語サーバーが必要とするコンパイルデータベースを取得できるようプロジェクトを設定します。
MSBuild プロジェクト
MSBuild ベースのプロジェクトでは、以下の 2 つの方法があります:
ガイド付きセットアップ: 「compile commands を再生成」または「プロジェクトを読み込み」と指示してスキルを使用し、プロジェクトを登録します。これにより言語サーバーに必要な設定が生成されます。
手動生成: サンプルのエクストラクターアプリケーションを使用して、MSBuild プロジェクトから compile_commands.json を生成します。多くのプロジェクトではそのまま動作しますが、複雑な構成の場合は適応が必要になる場合があります。
カスタムビルドシステム
カスタムビルドでは、標準的な検出機能では必ずしも検出できない、隔離された(hermetic)環境やベンダー提供のツールチェーン、あるいはラッパーベースのツールチェーンを使用することがよくあります。これらのプロジェクトの場合:
一度だけビルド設定をキャプチャし、それを再利用可能にするプロジェクト固有のスキルを作成してください。
チームは、手動で独自の compile_commands.json ファイルを提供し続けることも可能です。
このリポジトリ内の詳細なガイダンスでは、どの設定を固定すべきか、Copilot が信頼してコンパイルコマンドを再生成できるようにスキルをどのように構成すべきかが解説されています。
はじめに
プラグインをインストールし、EULA に同意するためにクイックスタートガイドに従ってください:
/plugin install cpp-language-server@copilot-plugins
次に、「regenerate compile commands」または「load project」と入力してプロジェクトを設定します。ビルド設定が変更された際は、言語サーバーとの同期を保つためにいつでもスキルを再実行してください。
アクティブな GitHub Copilot のサブスクリプションが必要です。
フィードバック
Microsoft C++ 言語サーバーの改善にご協力ください。Copilot CLI 向けの短いアンケートにご記入いただくか、問題の報告や改善提案を行う場合は、GitHub リポジトリでイシューを開いてください。
本記事「New C++ language server config skill for Copilot CLI」は、最初に The GitHub Blog で公開されました。
原文を表示
The Microsoft C++ Language Server is now available as a plugin on the Copilot Plugins marketplace. It includes a new built-in setup skill that helps automate project setup, making it easier to generate and maintain the compile_commands.json file the language server needs to understand your code.
Why this matters
The C++ language server relies on a compile_commands.json file to provide precise semantic intelligence (i.e., symbol navigation, diagnostics, and code changes that reflect how your compiler actually sees the code). Previously, creating this file required manual steps that varied by build system. The new setup skills handle this automatically for CMake and MSBuild projects, and they provide a repeatable pattern for custom build systems.
What’s new
Available via the Copilot Plugins marketplace
The C++ language server can now be installed directly as a Copilot CLI plugin:
/plugin install cpp-language-server@copilot-plugins
This replaces the previous npm-based installation and simplifies getting started and staying updated with the latest releases on Windows, Linux, and macOS.
Generate compile commands skill
The new generate compile commands skill lets you generate or refresh your compile_commands.json directly from Copilot CLI. Simply say “regenerate compile commands” or “load project” and the skill will configure your compilation database based on your project type and platform.
The language server automatically watches for changes to compile_commands.json, so updates take effect without restarting.
Recommended configuration by project type
CMake projects
If you don’t already have a compile_commands.json generated from your CMake builds, the recommended path is to use the skill to generate one for you. Alternatively, you can pass -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE when configuring CMake to directly produce the file from your build.
CMake has native support for compile command generation, and the skill helps configure the project so the language server has the compilation database it needs.
MSBuild projects
For MSBuild-based projects, you have two options:
Guided setup: Use the skill to onboard the project by saying “regenerate compile commands” or “load project.” The skill produces the configuration needed for the language server.
Manual generation: Use the sample extractor application to generate compile_commands.json from your MSBuild project. While it works out-of-the-box for many projects, it may require adaptation for complex configurations.
Custom build systems
Custom builds often use hermetic, vendored, or wrapper-based toolchains that standard discovery cannot always detect. For these projects:
Create a project-specific skill that captures your build setup once and makes it repeatable.
Teams can still manually provide their own compile_commands.json file.
The detailed guidance in the repository covers what settings to pin and how to structure a skill so Copilot can reliably regenerate compile commands.
Getting started
Install the plugin and follow the quick start guide to accept the EULA:
/plugin install cpp-language-server@copilot-plugins
Then say “regenerate compile commands” or “load project” to configure your project. Reinvoke the skill whenever your build configuration changes to keep the language server in sync.
An active GitHub Copilot subscription is required.
Feedback
Help us improve the Microsoft C++ language server for Copilot CLI by filling out our short survey. To report a problem or suggest an improvement, open an issue in our GitHub repository.
The post New C++ language server config skill for Copilot CLI appeared first on The GitHub Blog.
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み