瀏覽代碼

disable lsp on non-git folders

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

+ 1 - 0
packages/opencode/src/lsp/index.ts

@@ -57,6 +57,7 @@ export namespace LSP {
     async (app) => {
     async (app) => {
       log.info("initializing")
       log.info("initializing")
       const clients: LSPClient.Info[] = []
       const clients: LSPClient.Info[] = []
+      if (!app.git) return { clients }
 
 
       for (const server of Object.values(LSPServer)) {
       for (const server of Object.values(LSPServer)) {
         const roots = await server.roots(app)
         const roots = await server.roots(app)