Skip to content

feat(opencode): add LSP timeout configuration#21006

Open
ririnto wants to merge 1 commit intoanomalyco:devfrom
ririnto:feature/lsp-timeout-config
Open

feat(opencode): add LSP timeout configuration#21006
ririnto wants to merge 1 commit intoanomalyco:devfrom
ririnto:feature/lsp-timeout-config

Conversation

@ririnto
Copy link
Copy Markdown

@ririnto ririnto commented Apr 4, 2026

Issue for this PR

Related: #13328

Type of change

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

What does this PR do?

This PR adds per-server timeout configuration for configured LSP entries.

It introduces separate timeout settings for the two existing timeout paths:

  • timeout.startup for the LSP initialize request
  • timeout.diagnostics for the diagnostics wait path

This is related work for #13328, which calls out the lack of a user escape hatch for heavy LSP servers. It also follows the per-server configuration direction proposed in #6997 while keeping the scope limited to configured entries and the two existing timeout paths.

How did you verify your code works?

  • Ran bun test test/lsp/client.test.ts test/config/config.test.ts in packages/opencode
  • Ran bun typecheck in packages/opencode
  • Verified the timeout tests cover both default values and configured overrides

Screenshots / recordings

If this is a UI change, please include a screenshot or recording.

Checklist

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

- Allow configured LSP entries to override initialize and diagnostics timeouts.
- Document the behavior and lock in the default and override paths with tests.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 4, 2026

The following comment was made by an LLM, it may be inaccurate:

Based on the search results, I found a potentially related PR:

Related PR:

Please verify if PR #13332 is already merged or closed, and whether the current PR (21006) is a reimplementation or enhancement of that work.

Sign up for free to 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.

1 participant