github / github/copilot-cli

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

Open
#1,373 1 comment 6 reactions 0 assignees View on GitHub
area:configuration area:tools
Dominant language
Shell
Stars
11.2k
Forks
1.9k
Avg merge
14h 16m
Merged PRs (30d)
6

Description

### 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.