Dax Raad 1 年之前
父節點
當前提交
3cd7ae0807
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      packages/opencode/src/lsp/index.ts

+ 3 - 2
packages/opencode/src/lsp/index.ts

@@ -30,6 +30,9 @@ export namespace LSP {
     for (const match of matches) {
       const existing = s.clients.get(match.id)
       if (existing) continue
+      const [binary] = match.command
+      const bin = Bun.which(binary)
+      if (!bin) continue
       const client = await LSPClient.create({
         cmd: match.command,
         serverID: match.id,
@@ -103,13 +106,11 @@ export namespace LSP {
         ".ctsx",
       ],
     },
-    /*
     {
       id: "golang",
       command: ["gopls"],
       extensions: [".go"],
     },
-    */
   ]
 
   export namespace Diagnostic {