Copilot CLI のための新 C++ ランゲージサーバー設定スキル
本文の状態
日本語全文を表示中
詳細モードで約4分の本文を読めます。
同じ出来事の情報源
この情報源を基点に整理
GitHub Changelog
マイクロソフトが Copilot プラグイン市場に C++ ランゲージサーバーを公開し、プロジェクト設定の自動化や compile_commands.json 生成を支援する新スキルを追加した。
Source Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。
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 リポジトリでイシューを開いてください。
原文を表示
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デイリーブリーフで今日の重要ニュースをまとめ読み