Skip to content

feat: replace csharp-ls with roslyn-language-server - #14463

Merged
Hona merged 6 commits into
anomalyco:devfrom
jmbryan4:feat/csharp-roslyn-lsp
Apr 21, 2026
Merged

feat: replace csharp-ls with roslyn-language-server#14463
Hona merged 6 commits into
anomalyco:devfrom
jmbryan4:feat/csharp-roslyn-lsp

Conversation

@jmbryan4

@jmbryan4jmbryan4 commented Feb 20, 2026

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes#14462

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Replaces csharp-ls with roslyn-language-server as the default C# LSP. (@Hona confirmed this on 2026-04-20 with the Roslyn team).

The CSharp export in lsp/server.ts now installs roslyn-language-server via dotnet tool install --global roslyn-language-server --prerelease and starts it with --stdio --autoLoadProjects. The server id stays "csharp" so existing user configs are unaffected.

How did you verify your code works?

Screenshots / recordings

N/A — no UI changes.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actionsgithub-actionsBot added the needs:compliance This means the issue will auto-close after 2 hours. label Feb 20, 2026
@github-actionsgithub-actionsBot removed the needs:compliance This means the issue will auto-close after 2 hours. label Feb 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@adam-paterson

Copy link
Copy Markdown

Just spent the afternoon implementing this myself! ➕

@Hona

Hona commented Apr 20, 2026

Copy link
Copy Markdown
Member

heya @jmbryan4 the rosyln team says their LSP is good now - can you update this PR from dev + remove the flag.
we can fully swap to this one

Bring the branch current with upstream dev (2014 commits). Resolves
conflicts in flag.ts, lsp/index.ts, and lsp/server.ts by taking the
upstream refactored structure and applying the roslyn swap on top.
@jmbryan4jmbryan4 changed the title feat: add roslyn-language-server as opt-in C# LSP alternativefeat: replace csharp-ls with roslyn-language-serverApr 21, 2026
@github-actionsgithub-actionsBot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Apr 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@jmbryan4

Copy link
Copy Markdown
ContributorAuthor

@Hona great! I updated the PR

@Hona

Hona commented Apr 21, 2026

Copy link
Copy Markdown
Member

thanks @jmbryan4 presumably you've tested within a C# project using bun dev locally and confirm that LSP errors etc show up?

Comment threadpackages/opencode/src/lsp/server.ts Outdated
Comment on lines +725 to +726
"--tool-path",
Global.Path.bin,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lets just drop these 2 - global is okay here

@jmbryan4

Copy link
Copy Markdown
ContributorAuthor

thanks @jmbryan4 presumably you've tested within a C# project using bun dev locally and confirm that LSP errors etc show up?

yes

@Hona
Hona enabled auto-merge (squash) April 21, 2026 21:53
@Hona

Hona commented Apr 21, 2026

Copy link
Copy Markdown
Member

thank you - nice work :)

@Hona
Hona merged commit 5e9fb3c into anomalyco:devApr 21, 2026
8 checks passed
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
Co-authored-by: Mathews <Mathews.Bryan@cincpro.com>
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
Co-authored-by: Mathews <Mathews.Bryan@cincpro.com>
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
Co-authored-by: Mathews <Mathews.Bryan@cincpro.com>
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
Co-authored-by: Mathews <Mathews.Bryan@cincpro.com>
isaacfinnegan pushed a commit to isaacfinnegan/whispercode that referenced this pull request Jun 15, 2026
Co-authored-by: Mathews <Mathews.Bryan@cincpro.com>
MarsQiu007 referenced this pull request in MarsQiu007/openNovel Jul 31, 2026
Co-authored-by: Mathews <Mathews.Bryan@cincpro.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: add roslyn-language-server as opt-in C# LSP alternative to csharp-ls

3 participants

@jmbryan4@adam-paterson@Hona