Describe the bug
When configured in .github/lsp.json, /lsp test rust-analyzer does not work with the following content:
{
"lspServers": {
"rust-analyzer": {
"command": "rust-analyzer",
"args": [
"--stdio"
],
"fileExtensions": {
".rs": "rust"
},
"initializationOptions": {
"cargo": {
"buildScripts": {
"enable": true
},
"allFeatures": true
},
"procMacro": {
"enable": true
},
"checkOnSave": {
"command": "clippy"
}
}
}
}
}
I've tried /lsp reload, exiting and resuming the session or even starting a new one. /lsp show was showing it configured, but /lsp test rust-analyzer always erred with:
Server "rust-analyzer" not found. Available: (none)
I tried asking copilot several times. At one point it even moved the file to .copilot/lsp.json, which isn't documented.
It wasn't until it tried adding it to ~/.copilot/lsp-config.json with the following content that rust-analyzer started correctly:
{
"lspServers": {
"rust-analyzer": {
"command": "rust-analyzer",
"args": ["--stdio"],
"fileExtensions": {
".rs": "rust"
}
}
}
}
rust-analyzer is in my $PATH in ~/.cargo/bin.
Affected version
0.0.405
Steps to reproduce the behavior
- Ask Copilot to add rust-analyzer to
.github/lsp.json. This mostly worked. Initially it didn't add the --stdio argument but did eventually when it tried to figure out what was wrong. See my .github/lsp.json config above for what the final JSON was.
- Run
/lsp reload or /exit and restart (resume or start anew).
- Run
/lsp test rust-analyzer.
Even when which rust-analyzer returns the right path, copilot errs:
Server "rust-analyzer" not found. Available: (none)
Expected behavior
/lsp test rust-analyzer works with .github/lsp.json project-based configuration.
Additional context
- macOS 26.2
- bash 5.3.9
- rust-analyzer 1.95.0-nightly
Describe the bug
When configured in
.github/lsp.json,/lsp test rust-analyzerdoes not work with the following content:{ "lspServers": { "rust-analyzer": { "command": "rust-analyzer", "args": [ "--stdio" ], "fileExtensions": { ".rs": "rust" }, "initializationOptions": { "cargo": { "buildScripts": { "enable": true }, "allFeatures": true }, "procMacro": { "enable": true }, "checkOnSave": { "command": "clippy" } } } } }I've tried
/lsp reload, exiting and resuming the session or even starting a new one./lsp showwas showing it configured, but/lsp test rust-analyzeralways erred with:I tried asking
copilotseveral times. At one point it even moved the file to.copilot/lsp.json, which isn't documented.It wasn't until it tried adding it to
~/.copilot/lsp-config.jsonwith the following content thatrust-analyzerstarted correctly:{ "lspServers": { "rust-analyzer": { "command": "rust-analyzer", "args": ["--stdio"], "fileExtensions": { ".rs": "rust" } } } }rust-analyzeris in my$PATHin~/.cargo/bin.Affected version
0.0.405
Steps to reproduce the behavior
.github/lsp.json. This mostly worked. Initially it didn't add the--stdioargument but did eventually when it tried to figure out what was wrong. See my.github/lsp.jsonconfig above for what the final JSON was./lsp reloador/exitand restart (resume or start anew)./lsp test rust-analyzer.Even when
which rust-analyzerreturns the right path, copilot errs:Expected behavior
/lsp test rust-analyzerworks with.github/lsp.jsonproject-based configuration.Additional context