Skip to content

feat: add OPENCODE_RESPECT_LSP_DIAGNOSTICS flag to ensure LSP diagnostics are always processed - #12286

Closed
lmn451 wants to merge 1 commit into
anomalyco:devfrom
lmn451:feat/respect-lsp-diagnostics
Closed

lmn451 wants to merge 1 commit into
anomalyco:devfrom
lmn451:feat/respect-lsp-diagnostics

Conversation

@lmn451

@lmn451 lmn451 commented Feb 5, 2026 •

Copy link
Copy Markdown

Summary

  • Add OPENCODE_RESPECT_LSP_DIAGNOSTICS handling for LSP diagnostic flow.
  • Follow-up update: interpret the flag as a numeric timeout value in seconds.
  • Default is 0 (existing behavior; no timeout override mode).
  • Any value > 0 enables the override mode and uses that value as the timeout in seconds.

Behavior

  • OPENCODE_RESPECT_LSP_DIAGNOSTICS=0 (or unset): existing behavior.
    • 150ms diagnostics debounce
    • 3s diagnostics wait timeout
    • TypeScript first-diagnostic skip remains
  • OPENCODE_RESPECT_LSP_DIAGNOSTICS=<N> where N > 0:
    • 0ms diagnostics debounce
    • diagnostics wait timeout becomes N seconds
    • TypeScript first-diagnostic skip disabled

Usage

export OPENCODE_RESPECT_LSP_DIAGNOSTICS=10
opencode

Issue Addressed

Fixes #12288.

This follow-up update was made to satisfy the issue comment requesting numeric timeout semantics (value = seconds), where 3 is only an example value.

Testing

  • bun test test/lsp/client.test.ts (from packages/opencode) passes.

@github-actions

github-actions Bot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

github-actions Bot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

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

No duplicate PRs found

@lmn451
lmn451 requested a review from adamdotdevin as a code owner March 3, 2026 18:04
@lmn451

lmn451 commented Mar 3, 2026

Copy link
Copy Markdown
Author

Follow-up pushed: updated OPENCODE_RESPECT_LSP_DIAGNOSTICS to numeric semantics as requested in the issue comment.

Current behavior:

  • 0 = default/no-timeout mode
  • 3 = enable LSP diagnostic-timeout mode

@lmn451 lmn451 closed this by deleting the head repository Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LSP diagnostics are skipped or delayed under multiple conditions

1 participant