github / github/copilot-cli

.github/lsp.json reports issues, while identical config works OK in ~/.copilot/lsp-config.json

オープン
#1,373 コメント 1 件 リアクション 6 件 担当者 0 名 GitHub で見る
area:configuration area:tools
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

### Describe the bug

When running `/lsp test myserver` with `.github/lsp.json`, I get a message saying it's not there, blocking me from providing it as a convenient default for my teammates.

Moving `.github/lsp.json` to `~/.copilot/lsp-config.json` makes it work immediately.

### Affected version

0.0.406

### Steps to reproduce the behavior

1. Put the below in `.github/lsp.json`
```
"lspServers": {
"gopls": {
"command": "gopls",
"args": ["serve"],
"fileExtensions": {
".go": "go"
}
}
}
}

```

2. Run `/lsp show` to see:

```
● LSP Server Status:

Project-configured servers:
• gopls: (.go)
```
3. Run `/lsp test gopls` and you'll get:

```
✗ Server "gopls" not found. Available: (none)
```
4. Move the exact file to the global conf: `mv .github/lsp.json ~/.copilot/lsp-config.json`
5. Run `/lsp test gopls` and it passes:
```

● ✓ Server "gopls" started successfully!

PID: 31643
Spawn time: 7ms

Server was killed after successful test.
```

### Expected behavior

I'd expect the config to work OK in .github/

### Additional context

Linux, tested on both bash and zsh

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。