LSP server not found when configured via project-level .github/lsp.json
- Vorherrschende Sprache
- Shell
- Sterne
- 11.2k
- Forks
- 1.9k
- Ø Merge
- 14 Std. 16 Min.
- Gemergte PRs (30 T.)
- 6
Beschreibung
### Describe the bug
GitHub Copilot CLI fails to locate or initialize LSP servers when they are defined in a project-specific `.github/lsp.json` file, even though the CLI correctly detects the file's presence. The same configuration works perfectly when placed in the global `~/.copilot/lsp-config.json`.
Not working example in `.github/lsp.json`
```
/lsp
LSP Server Status:
Project-configured servers:
• typescript: (.ts, .tsx)
User config: C:\Users\user\.copilot\lsp-config.json
Project config: C:\project\.github\lsp.json
```
```
/lsp test typescript
✗ Server "typescript" not found. Available: (none)
```
Lsp works correctly if cofigured in: `.~/.copilot/lsp-config.json`.
```
User-configured servers:
• typescript: typescript-language-server (.ts, .tsx)
User config: C:\Users\user\.copilot\lsp-config.json
✓ Server "typescript" started successfully!
PID: 24812
Spawn time: 20ms
Server was killed after successful test.
```
### Affected version
1.0.12
### Steps to reproduce the behavior
1. Configure lsp in `.github/lsp.json`
2. Start copilot
3. /lsp test lsp-name
### Expected behavior
LSP server should start successfully.
### Additional context
Used config:
```
{
"lspServers": {
"typescript": {
"command": "typescript-language-server",
"args": ["--stdio"],
"fileExtensions": {
".ts": "typescript",
".tsx": "typescript"
}
}
}
}
```
Windows 11, Terminal, Powershell7
Beitragsleitfaden
Rechercherichtung
Start with the project configuration path in .github/lsp.json and compare it with the working ~/.copilot/lsp-config.json path. Reproduce the issue with /lsp test typescript on Windows, then verify that the project-configured typescript server starts successfully and reports the same status as the user-configured server.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- shell, typescript
- Bereich
- cli, tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 52/100