Skip to content

fix(dotnet): add Claude Code-shaped .lsp.json so LSP loads in Claude Code - #598

Merged
AbhitejJohn merged 3 commits into
dotnet:mainfrom
romanglogowski-volue:fix/claude-code-lsp-schema
Jul 21, 2026
Merged

fix(dotnet): add Claude Code-shaped .lsp.json so LSP loads in Claude Code#598
AbhitejJohn merged 3 commits into
dotnet:mainfrom
romanglogowski-volue:fix/claude-code-lsp-schema

Conversation

@romanglogowski-volue

Copy link
Copy Markdown
Contributor

Summary

Claude Code silently rejects the existing plugins/dotnet/lsp.json and the Roslyn language server is never registered (/reload-plugins reports 0 plugin LSP servers). This adds a sibling plugins/dotnet/.lsp.json shaped for Claude Code's documented LSP schema. Copilot CLI continues to read the existing lsp.json unchanged — the two hosts read different filenames.

Why two files?

Claude Code and Copilot CLI document different LSP plugin schemas:

Copilot CLI Claude Code
Filename lsp.json .lsp.json (auto-discovered at plugin root)
External-file wrapper outer lspServers: { … } required no wrapper — file IS the server map
Extension field fileExtensions extensionToLanguage

Sources:

The existing lsp.json is correctly shaped for Copilot CLI, but applying it as-is in Claude Code fails parse on both fronts (lspServers wrapper + missing extensionToLanguage). Adding a second file shaped for Claude Code is the smallest portable fix.

Verification

Locally (Windows 11, Claude Code Opus 4.7, .NET 10 SDK, roslyn-language-server installed via dotnet tool install -g):

Before:

/reload-plugins
Reloaded: 3 plugins · … · 0 plugin LSP servers

After (with .lsp.json in place):

/reload-plugins
Reloaded: 3 plugins · … · 1 plugin LSP server

findReferences and goToImplementation against a real interface symbol work end-to-end through Claude Code's LSP tool.

Scope

Only plugins/dotnet/. Other plugins in this repo (dotnet-data, dotnet-test, dotnet-aspnet, …) don't currently ship LSP configs, so nothing else needs the same change.

Test plan

  • Install plugin via /plugin install dotnet@dotnet-agent-skills in Claude Code → /reload-plugins reports 1 plugin LSP server for the dotnet plugin
  • Install plugin in Copilot CLI → existing lsp.json is still picked up (no regression)
  • Open any .cs file → goToDefinition / findReferences work via Roslyn

Copilot AI review requested due to automatic review settings April 29, 2026 12:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a Claude Code–compatible LSP configuration for the dotnet plugin so Roslyn registers correctly in Claude Code without changing the existing Copilot CLI LSP setup.

Changes:

  • Introduces plugins/dotnet/.lsp.json using Claude Code’s .lsp.json schema (server map at root + extensionToLanguage).
  • Keeps the existing plugins/dotnet/lsp.json (Copilot CLI schema with lspServers wrapper + fileExtensions) unchanged.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@romanglogowski-volue

Copy link
Copy Markdown
Contributor Author

@dotnet-policy-service agree company="Volue"

Claude Code auto-discovers `.lsp.json` at plugin root and expects a
schema that differs from Copilot CLI's `lsp.json`:

- No outer `lspServers` wrapper in the external file (the wrapper is
  only used when defining LSP servers inline in `plugin.json`).
- Required field is `extensionToLanguage`, not `fileExtensions`.

Without this file, Claude Code silently rejects the existing
`lsp.json` (Copilot CLI shape) and the Roslyn language server is
never registered — `/reload-plugins` reports `0 plugin LSP servers`.
After adding `.lsp.json`, the count becomes `1 plugin LSP server`
and `findReferences`, `goToImplementation`, etc. work end-to-end.

The existing `lsp.json` is left untouched so Copilot CLI continues
to work; the two hosts read different filenames and never see each
other's config.

References:
- https://code.claude.com/docs/en/plugins-reference (lspServers,
  external `.lsp.json` format, required fields)
- https://docs.github.com/en/copilot/how-tos/copilot-cli/set-up-copilot-cli/add-lsp-servers (Copilot CLI uses `lsp.json` with `lspServers` wrapper and `fileExtensions`)

Signed-off-by: Roman Głogowski <roman.glogowski@volue.com>
@romanglogowski-volue
romanglogowski-volue force-pushed the fix/claude-code-lsp-schema branch from 88d4cd9 to e03f2f2 Compare May 5, 2026 06:41
@romanglogowski-volue

Copy link
Copy Markdown
Contributor Author

Ping :)

@AbhitejJohn

Copy link
Copy Markdown
Collaborator

Tagging @JoeRobich and @dibarbet to help with review. Related #607

Comment thread plugins/dotnet/.lsp.json Outdated
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

✅ Automated diff scan completed for e03f2f2 — no security concerns flagged.

This is an automated static analysis of the PR diff.

Note

🔒 Integrity filter blocked 84 items

The following items were blocked because they don't meet the GitHub integrity level.

  • #598 pull_request_read: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #598 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #4 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #11 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #12 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #13 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #14 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #15 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #19 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #21 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #22 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #25 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #26 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #27 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #28 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #29 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • ... and 68 more items

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
  github:
    min-integrity: approved  # merged | approved | unapproved | none

Generated by PR Malicious Code Scan · ● 998.6K ·

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

✅ Automated diff scan completed for e03f2f2 — no security concerns flagged.

This is an automated static analysis of the PR diff.

Note

🔒 Integrity filter blocked 47 items

The following items were blocked because they don't meet the GitHub integrity level.

  • #598 pull_request_read: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #598 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • fix(dotnet): add Claude Code-shaped .lsp.json so LSP loads in Claude Code #598 pull_request_read: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • e03f2f2 list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • 2633d3d list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • 1613c98 list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • 22575b2 list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • 809d0b1 list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • a55227f list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • 3eb7206 list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • 81946d2 list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • 2575de7 list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • 1b105d1 list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • c6cf65c list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • 4ace545 list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • d917c7b list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • ... and 31 more items

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
  github:
    min-integrity: approved  # merged | approved | unapproved | none

Generated by PR Malicious Code Scan · ● 741.2K ·

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

✅ Automated diff scan completed for e03f2f2 — no security concerns flagged.

This is an automated static analysis of the PR diff.

Note

🔒 Integrity filter blocked 42 items

The following items were blocked because they don't meet the GitHub integrity level.

  • #598 pull_request_read: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #694 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #686 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #682 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #609 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #607 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #601 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #598 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #502 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #486 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #376 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #329 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #303 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #269 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #267 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #266 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • ... and 26 more items

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
  github:
    min-integrity: approved  # merged | approved | unapproved | none

Generated by PR Malicious Code Scan · ● 405.3K ·

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

✅ Automated diff scan completed for e03f2f2 — no security concerns flagged.

This is an automated static analysis of the PR diff.

Note

🔒 Integrity filter blocked 35 items

The following items were blocked because they don't meet the GitHub integrity level.

  • #598 pull_request_read: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #598 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #694 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #686 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #581 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #601 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #598 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #597 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #694 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #686 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #682 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #609 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #607 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #502 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #486 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #376 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • ... and 19 more items

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
  github:
    min-integrity: approved  # merged | approved | unapproved | none

Generated by PR Malicious Code Scan · ● 844.3K ·

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

✅ Automated diff scan completed for e03f2f2 — no security concerns flagged.

This is an automated static analysis of the PR diff.

Note

🔒 Integrity filter blocked 83 items

The following items were blocked because they don't meet the GitHub integrity level.

  • #598 pull_request_read: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #598 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #694 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #609 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #686 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #601 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #237 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #486 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #694 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #686 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #682 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #609 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #607 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #601 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #598 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #502 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • ... and 67 more items

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
  github:
    min-integrity: approved  # merged | approved | unapproved | none

Generated by PR Malicious Code Scan · ● 742.8K ·

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

✅ Automated diff scan completed for e03f2f2 — no security concerns flagged.

This is an automated static analysis of the PR diff.

Note

🔒 Integrity filter blocked 14 items

The following items were blocked because they don't meet the GitHub integrity level.

  • #598 pull_request_read: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • fix(dotnet): add Claude Code-shaped .lsp.json so LSP loads in Claude Code #598 pull_request_read: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #598 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #694 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #609 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #686 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #601 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #237 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #486 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • e03f2f2 list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • 2633d3d list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • 1613c98 list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • 22575b2 list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • 809d0b1 list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
  github:
    min-integrity: approved  # merged | approved | unapproved | none

Generated by PR Malicious Code Scan · ● 313.3K ·

Co-authored-by: Joey Robichaud <joseph.robichaud@microsoft.com>
Copilot AI review requested due to automatic review settings June 5, 2026 05:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread plugins/dotnet/.lsp.json
Comment thread plugins/dotnet/.lsp.json
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically closed because it has been open for more than 30 days with no recent activity.

If you believe this work is still relevant, please feel free to reopen or create a new pull request. Thank you for your contribution!

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • awmgmcpg

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "awmgmcpg"

See Network Configuration for more information.

Generated by Close Stale Pull Requests · 24.1 AIC · ⌖ 5.6 AIC · ⊞ 4.9K

@github-actions github-actions Bot closed this Jul 20, 2026
@romanglogowski-volue

Copy link
Copy Markdown
Contributor Author

Please, can you re-open the PR?

@AbhitejJohn

Copy link
Copy Markdown
Collaborator

Sorry, reopened.

Copilot AI review requested due to automatic review settings July 21, 2026 22:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new

@AbhitejJohn

Copy link
Copy Markdown
Collaborator

Verified locally that this works as well.

@AbhitejJohn
AbhitejJohn merged commit 5354047 into dotnet:main Jul 21, 2026
32 checks passed
@AbhitejJohn

Copy link
Copy Markdown
Collaborator

@romanglogowski-volue : Thank you for this fix and being patient while we ironed out a few things on our end. Glad we got this merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-on-review PR state label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants