Configurable LSP `workspace/configuration` and `didChangeConfiguration` Support in Copilot CLI
- 主要言語
- Shell
- スター
- 11.2k
- フォーク
- 1.9k
- 平均マージ
- 14時間 16分
- マージ済み PR(30日)
- 6
説明
### Describe the feature or problem you'd like to solve
Add support for configuring arbitrary Language Server Protocol (LSP) configuration payloads in Copilot CLI.
### Proposed solution
Currently, Copilot CLI can launch LSP servers, but there is no way to control what is sent through the following LSP methods:
* `workspace/didChangeConfiguration`
* `workspace/configuration`
This makes many language servers partially unusable because critical settings cannot be provided to the server.
## Problem
Many LSP servers rely heavily on runtime configuration delivered through LSP configuration requests instead of command-line arguments or environment variables.
For example, `intelephense` requires configuration for:
* excluded file patterns
* storage/indexing behavior
* diagnostics
* stubs
* file size limits
Without support for configuration payloads:
* large monorepos become slow or unusable
* excluded/vendor/generated files cannot be filtered
* indexing behavior cannot be tuned
* workspace-specific settings cannot be applied
At the moment, Copilot CLI appears to start the server successfully but provides no mechanism for forwarding user-defined configuration objects to the LSP server. The option `initializationOptions` does not solve this problem either because many LSP servers - including Intelephense - expect runtime settings to be delivered specifically through the standard LSP configuration flow (`workspace/didChangeConfiguration` and `workspace/configuration`).
## Proposed Solution
Allow arbitrary configuration blocks to be defined per language server and forwarded via:
* `workspace/didChangeConfiguration`
* responses to `workspace/configuration`
Example configuration:
```json
{
"php": {
"command": "intelephense",
"args": [
"--stdio"
],
"fileExtensions": {
".php": "php"
},
"configuration": {
"intelephense": {
"files": {
"exclude": [
"**/vendor/**",
"**/var/cache/**",
"**/node_modules/**"
]
},
"environment": {
"phpVersion": "8.5"
},
"diagnostics": {
"undefinedTypes": false
}
}
}
}
}
```
## Expected Behavior
Copilot CLI should:
1. Send the provided configuration object through `workspace/didChangeConfiguration`
2. Respond to `workspace/configuration` requests using the configured values
3. Support arbitrary nested JSON structures
### Example prompts or workflows
_No response_
### Additional context
_No response_
コントリビューションガイド
調査の方向性
Issue では、LSP メソッド workspace/didChangeConfiguration と workspace/configuration が関連するエントリーポイントとして特定されています。まず、Copilot CLI がどのように LSP サーバーを起動し、これらのメッセージをルーティングするかを追跡してください。完了の条件は、各言語サーバーが両方のメソッドを通じて、Intelephense の設定例を含む任意の入れ子構造の設定を受信できることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- shell
- 領域
- cli, tooling
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 55/100