opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat: Add configurable lsp timeout

Open tjg184 opened this issue 1 week ago • 4 comments

This is a proposal to allow timeouts to be set for LSPs at the specific server/LSP levels. Currently, there is a default timeout of 45 seconds, which is sometimes not long enough. As one example, in the kotlin-ls LSP, some projects are larger and could take longer than this to initialize.

This PR is attempting to allow a specific server timeout only.

An example is below showing overriding the kotlin-ls timeout.

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

tjg184 avatar Jan 05 '26 21:01 tjg184