Skip to content

[FEATURE]: Allow configurable timeouts to be set on LSPs #7477

Closed

Description

@tjg184

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Some LSPs take longer to initialize. Currently, opencode has a default of 45 seconds, which is generally long enough, but not for all projects.

As an example, projects that have a high number of dependencies that need to be downloaded may take longer than the default timeout. I've seen this as an example with the kotlin-ls LSP.

This is the suggestion to either allow the global timeout to be configured beyond the 45 seconds or allow a specific LSP to be configured to override the default. Alternatively, we could just bump the 45 seconds to a higher value, but I suspect this will be an ongoing problem.

If we decide on the per-server timeout, I think it makes sense to allow an override on a built-in LSP server as well as a custom server.

I started a PR here to see what it might look like, specifically for the first case. #6997

Overriding a specific LSP:

{
  "$schema": "https://opencode.ai/config.json",
  "instructions": ["STYLE_GUIDE.md"],
  "provider": {
    "opencode": {
      "options": {},
    },
  },
  "lsp": {
    "kotlin-ls": {
      "timeout": 120000
    },
  },
}

Overriding the default LSP timeout:

{
  "$schema": "https://opencode.ai/config.json",
  "instructions": ["STYLE_GUIDE.md"],
  "provider": {
    "opencode": {
      "options": {},
    },
  },
  "lsp": {
      "timeout": 120000
  },
}

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Jan 9, 2026
  2. pure-craft commented on Jan 26, 2026

    @pure-craft

    I am encountering a similar issue with Vue LSP (Volar) timing out due to heavy initialization, which seems related to the hardcoded timeout limits. The situation is exacerbated by a version mismatch in my project (Vue 3.4+ with legacy vue-tsc 0.39), but a configurable timeout would greatly help in diagnosing and mitigating such environment-specific slow starts. +1 for this feature request.

  3. tjg184 commented on Jan 28, 2026

    @tjg184
    ContributorAuthor

    I am encountering a similar issue with Vue LSP (Volar) timing out due to heavy initialization, which seems related to the hardcoded timeout limits. The situation is exacerbated by a version mismatch in my project (Vue 3.4+ with legacy vue-tsc 0.39), but a configurable timeout would greatly help in diagnosing and mitigating such environment-specific slow starts. +1 for this feature request.

    I have linked PR if you want to attempt to test. It fixes our issue.

  4. added a commit that references this issue on Feb 12, 2026
    1e93871
  5. github-actions commented on Mar 30, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions