github / github/copilot-cli

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

未關閉
#1,373 1 則留言 6 個 reaction 已指派 0 人 在 GitHub 檢視
area:configuration area:tools
主要語言
Shell
星號
11.2k
分支
1.9k
平均合併
14 小時 16 分鐘
30 天內合併 PR
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 摘要。