MCPcopy Index your code
hub / github.com/anomalyco/opencode / installRoslynLanguageServer

Function installRoslynLanguageServer

packages/opencode/src/lsp/server.ts:750–775  ·  view source on GitHub ↗
(disableLspDownload: boolean)

Source from the content-addressed store, hash-verified

748}
749
750async function installRoslynLanguageServer(disableLspDownload: boolean) {
751 if (!which("dotnet")) {
752 return
753 }
754
755 if (disableLspDownload) return
756 const proc = Process.spawn(["dotnet", "tool", "install", "--global", "roslyn-language-server", "--prerelease"], {
757 stdout: "pipe",
758 stderr: "pipe",
759 stdin: "pipe",
760 })
761 const exit = await proc.exited
762 if (exit !== 0) {
763 return
764 }
765
766 const resolved = which("roslyn-language-server")
767 if (resolved) {
768 return resolved
769 }
770
771 const global = await roslynLanguageServerGlobalPath()
772 if (global) {
773 return global
774 }
775}
776
777async function roslynLanguageServerGlobalPath() {
778 const bin = path.join(

Callers 1

getRoslynLanguageServerFunction · 0.85

Calls 3

whichFunction · 0.90
spawnMethod · 0.80

Tested by

no test coverage detected