Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/opencode/src/lsp/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ export async function create(input: { serverID: string; server: LSPServer.Handle
},
},
}),
INITIALIZE_TIMEOUT_MS,
input.server.initializeTimeout ?? INITIALIZE_TIMEOUT_MS,
).catch((err) => {
logger.error("initialize error", { error: err })
throw new InitializeError(
Expand Down
4 changes: 4 additions & 0 deletions packages/opencode/src/lsp/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ const output = (cmd: string[], opts: Process.RunOptions = {}) => Process.text(cm
export interface Handle {
process: ChildProcessWithoutNullStreams
initialization?: Record<string, any>
/** Override the default 45 s initialize-request timeout (ms). */
initializeTimeout?: number
}

type RootFunction = (file: string, ctx: InstanceContext) => Promise<string | undefined>
Expand Down Expand Up @@ -1290,6 +1292,7 @@ export const JDTLS: Info = {
cwd: root,
},
),
initializeTimeout: 180_000,
}
},
}
Expand Down Expand Up @@ -1389,6 +1392,7 @@ export const KotlinLS: Info = {
process: spawn(launcherScript, ["--stdio"], {
cwd: root,
}),
initializeTimeout: 180_000,
}
},
}
Expand Down
Loading