-
Notifications
You must be signed in to change notification settings - Fork 5.1k
feat: Add configurable lsp timeout #6997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
|
The following comment was made by an LLM, it may be inaccurate: Results: No duplicate PRs found. The search for "lsp timeout" and "configurable timeout" returned PR #6997 (the current PR) along with some tangentially related PRs, but none of them appear to be addressing the same feature:
✅ Conclusion: PR #6997 appears to be a unique feature request for configurable LSP timeout with no existing duplicates. |
2f8d58a to
2e64e7a
Compare
|
Adding timeout field to this makes sense: I dont really like that global version you did, I'd rather just make a flag |
Good call on removing the global timeout. Take a look at the change now. It's slightly different than what you suggested, as I believe just adding the |
| z.union([ | ||
| z.object({ | ||
| disabled: z.literal(true), | ||
| }), | ||
| z.object({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did we get rid of the union here? That union made some of the code nicer, now u need extra null checks everywhere...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, that was a mistake. I corrected it.
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
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-lsLSP, 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-lstimeout.{ "$schema": "https://opencode.ai/config.json", "instructions": ["STYLE_GUIDE.md"], "provider": { "opencode": { "options": {}, }, }, "lsp": { "kotlin-ls": { "timeout": 120000, }, }, }